批发价格修改
This commit is contained in:
parent
aa3e8e8b6b
commit
8d3e871c6c
|
@ -2,8 +2,8 @@
|
||||||
"name": "惠农商户平台",
|
"name": "惠农商户平台",
|
||||||
"appid": "__UNI__7626C0F",
|
"appid": "__UNI__7626C0F",
|
||||||
"description": "",
|
"description": "",
|
||||||
"versionName" : "1.5.3",
|
"versionName": "1.5.4",
|
||||||
"versionCode" : 1530,
|
"versionCode": 1540,
|
||||||
"transformPx": false,
|
"transformPx": false,
|
||||||
/* 5+App特有相关 */
|
/* 5+App特有相关 */
|
||||||
"app-plus": {
|
"app-plus": {
|
||||||
|
@ -343,4 +343,3 @@
|
||||||
}
|
}
|
||||||
//拨打电话权限关闭
|
//拨打电话权限关闭
|
||||||
/* ios打包配置 */
|
/* ios打包配置 */
|
||||||
|
|
||||||
|
|
|
@ -111,7 +111,8 @@
|
||||||
<div class="broadcast_details_img_no">
|
<div class="broadcast_details_img_no">
|
||||||
<image :src="item.product.image" />
|
<image :src="item.product.image" />
|
||||||
</div>
|
</div>
|
||||||
<div class="broadcast_details_picBox_no noPad">
|
<div class="broadcast_details_picBox_no noPad"
|
||||||
|
v-if="isWholeSale == 0 || isWholeSale == 2">
|
||||||
<div class="broadcast_details_pic">
|
<div class="broadcast_details_pic">
|
||||||
¥{{ item.product.price }}
|
¥{{ item.product.price }}
|
||||||
</div>
|
</div>
|
||||||
|
@ -119,6 +120,17 @@
|
||||||
{{item.product.store_name}}
|
{{item.product.store_name}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="broadcast_details_picBox_no noPad"
|
||||||
|
v-if="isWholeSale == 1 || isWholeSale == 2">
|
||||||
|
<div class="broadcast_details_pic">
|
||||||
|
¥{{ item.product.wholesale_price }}
|
||||||
|
</div>
|
||||||
|
<div class="broadcast_details_tit_no line1">
|
||||||
|
{{item.product.store_name}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
</navigator>
|
</navigator>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -959,7 +971,8 @@
|
||||||
httpUrl: '',
|
httpUrl: '',
|
||||||
press: false,
|
press: false,
|
||||||
index: 0,
|
index: 0,
|
||||||
j: 0
|
j: 0,
|
||||||
|
isWholeSale: ''
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
@ -1008,6 +1021,9 @@
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
// #endif
|
// #endif
|
||||||
|
|
||||||
|
this.isWholeSale = this.$store.state.app.userInfo?.mer_info?.wholesale
|
||||||
|
console.log(this.isWholeSale);
|
||||||
},
|
},
|
||||||
onReady() {
|
onReady() {
|
||||||
this.httpUrl = `${HTTP_REQUEST_URL}/static/look.png`;
|
this.httpUrl = `${HTTP_REQUEST_URL}/static/look.png`;
|
||||||
|
|
|
@ -92,12 +92,15 @@
|
||||||
clear: false,
|
clear: false,
|
||||||
isAuto: false, //没有授权的不会自动授权
|
isAuto: false, //没有授权的不会自动授权
|
||||||
isShowAuth: false, //是否隐藏授权
|
isShowAuth: false, //是否隐藏授权
|
||||||
|
isWholeSale: ''
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: mapGetters(['isLogin', 'viewColor']),
|
computed: mapGetters(['isLogin', 'viewColor']),
|
||||||
onLoad(optios) {
|
onLoad(optios) {
|
||||||
this.type = optios.type || 1;
|
this.type = optios.type || 1;
|
||||||
this.getindex()
|
this.getindex();
|
||||||
|
this.isWholeSale = this.$store.state.app.userInfo?.mer_info?.wholesale
|
||||||
|
console.log(this.isWholeSale);
|
||||||
},
|
},
|
||||||
onShow(option) {
|
onShow(option) {
|
||||||
if (this.isLogin) {
|
if (this.isLogin) {
|
||||||
|
|
|
@ -51,7 +51,10 @@
|
||||||
<view v-else class='share acea-row row-between row-bottom'>
|
<view v-else class='share acea-row row-between row-bottom'>
|
||||||
<view class='money p-color skeleton-rect' style="min-width: 70rpx;">
|
<view class='money p-color skeleton-rect' style="min-width: 70rpx;">
|
||||||
¥
|
¥
|
||||||
<text class='num'>{{storeInfo.price}}</text>
|
<text class='num'
|
||||||
|
v-if="isWholeSale == 0 || isWholeSale == 2">{{storeInfo.price}}</text>
|
||||||
|
<text class='num'
|
||||||
|
v-if="isWholeSale == 1 || isWholeSale == 2">{{storeInfo.wholesale_price}}</text>
|
||||||
<view v-if="svipData && svipData.show_svip_price && svipData.show_svip"
|
<view v-if="svipData && svipData.show_svip_price && svipData.show_svip"
|
||||||
style="display: inline-block;">
|
style="display: inline-block;">
|
||||||
<text class="vip-money">¥{{storeInfo.svip_price}}</text>
|
<text class="vip-money">¥{{storeInfo.svip_price}}</text>
|
||||||
|
@ -619,7 +622,8 @@
|
||||||
params: []
|
params: []
|
||||||
},
|
},
|
||||||
product_type: 0,
|
product_type: 0,
|
||||||
referer: ''
|
referer: '',
|
||||||
|
isWholeSale: ''
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
@ -697,6 +701,9 @@
|
||||||
this.downloadFilePromotionCode();
|
this.downloadFilePromotionCode();
|
||||||
this.getHistory()
|
this.getHistory()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.isWholeSale = this.$store.state.app.userInfo?.mer_info?.wholesale
|
||||||
|
console.log(this.isWholeSale);
|
||||||
},
|
},
|
||||||
onReady() {
|
onReady() {
|
||||||
this.isNodes++;
|
this.isNodes++;
|
||||||
|
|
|
@ -63,28 +63,31 @@
|
||||||
<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>
|
||||||
<u-form-item label="计量单位" prop="formData.unit_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="display: flex;align-items: center;" slot='right' @click='showPouple=true'>
|
||||||
<view style="margin-right: 10rpx;line-height: 25rpx;color:#777777">
|
<view style="margin-right: 10rpx;line-height: 25rpx;color:rgb(119, 119, 119);font-size: 28rpx;">
|
||||||
{{formData.attrValue[0].unit_name ||'请选择'}}
|
{{formData.attrValue[0].unit_name ||'请选择'}}
|
||||||
</view>
|
</view>
|
||||||
<u-icon name="arrow-right" style="margin-right: 30rpx;"></u-icon>
|
<u-icon name="arrow-right"></u-icon>
|
||||||
</view>
|
</view>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
|
|
||||||
<u-form-item v-if='isWholeSale' label="批发价格" prop="formData.wholesale_price" ref="item1" border-bottom>
|
<u-form-item v-if='isWholeSale == 2 || isWholeSale == 1' label="批发价格" prop="formData.wholesale_price"
|
||||||
<u--input inputAlign='right' placeholderStyle="color:#777777" style="width: 300rpx;"
|
ref="item1" border-bottom>
|
||||||
placeholder="请输入批发价格" @blur='fixed2(2)' type='number'
|
<u--input inputAlign='right' placeholderStyle="font-size:28rpx;color:rgb(119, 119, 119);"
|
||||||
|
style="width: 300rpx;" placeholder="请输入批发价格" @blur='fixed2(2)' type='number'
|
||||||
v-model="formData.attrValue[0].wholesale_price" slot='right'></u--input>
|
v-model="formData.attrValue[0].wholesale_price" slot='right'></u--input>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
|
|
||||||
<u-form-item v-else label="零售价格" prop="formData.price" ref="item1" border-bottom>
|
<u-form-item v-if='isWholeSale == 2 || isWholeSale == 0' label="零售价格" prop="formData.price" ref="item1"
|
||||||
<u--input inputAlign='right' placeholderStyle="color:#777777" style="width: 300rpx;"
|
border-bottom>
|
||||||
placeholder="请输入零售价" type='number' @blur='fixed2(1)' v-model="formData.attrValue[0].price"
|
<u--input inputAlign='right' placeholderStyle="font-size:28rpx;color:rgb(119, 119, 119);"
|
||||||
slot='right'></u--input>
|
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>
|
||||||
|
|
||||||
<u-form-item label="商品库存" prop="formData.stock" ref="item1">
|
<u-form-item label="商品库存" prop="formData.stock" ref="item1">
|
||||||
<u--input inputAlign='right' type='number' placeholderStyle="color:#777777" style="width: 300rpx;"
|
<u--input inputAlign='right' type='number'
|
||||||
|
placeholderStyle="font-size:28rpx;color:rgb(119, 119, 119);" style="width: 300rpx;"
|
||||||
placeholder="请输入库存" v-model="formData.attrValue[0].stock" slot='right'></u--input>
|
placeholder="请输入库存" v-model="formData.attrValue[0].stock" slot='right'></u--input>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
</view>
|
</view>
|
||||||
|
@ -184,7 +187,7 @@
|
||||||
columns: [
|
columns: [
|
||||||
['图片', '视频', ]
|
['图片', '视频', ]
|
||||||
],
|
],
|
||||||
isWholeSale: false, //批发商
|
isWholeSale: '', //批发商
|
||||||
show: false, //选择图片还是视屏
|
show: false, //选择图片还是视屏
|
||||||
showCustom: false, //计量单位自定义
|
showCustom: false, //计量单位自定义
|
||||||
mer_id: "",
|
mer_id: "",
|
||||||
|
@ -515,12 +518,15 @@
|
||||||
},
|
},
|
||||||
onLoad(option) {
|
onLoad(option) {
|
||||||
this.mer_id = option.mer_id
|
this.mer_id = option.mer_id
|
||||||
if (this.$store.state.app.userInfo?.mer_info?.wholesale == 2 || this.$store.state.app.userInfo?.mer_info
|
|
||||||
?.wholesale == 1) {
|
this.isWholeSale = this.$store.state.app.userInfo?.mer_info?.wholesale;
|
||||||
this.isWholeSale = true;
|
|
||||||
} else {
|
// if (this.$store.state.app.userInfo?.mer_info?.wholesale == 2 || this.$store.state.app.userInfo?.mer_info
|
||||||
this.isWholeSale = false;
|
// ?.wholesale == 1) {
|
||||||
}
|
// this.isWholeSale = true;
|
||||||
|
// } else {
|
||||||
|
// this.isWholeSale = false;
|
||||||
|
// }
|
||||||
|
|
||||||
if (option.formData) {
|
if (option.formData) {
|
||||||
this.formData = JSON.parse(option.formData)
|
this.formData = JSON.parse(option.formData)
|
||||||
|
@ -603,10 +609,11 @@
|
||||||
.goods-leval-li {
|
.goods-leval-li {
|
||||||
margin-right: 20rpx;
|
margin-right: 20rpx;
|
||||||
padding: 10rpx 40rpx;
|
padding: 10rpx 40rpx;
|
||||||
height: 60rpx;
|
/* height: 60rpx; */
|
||||||
margin-bottom: 20rpx;
|
margin-bottom: 20rpx;
|
||||||
border-radius: 36rpx 36rpx 36rpx 36rpx;
|
border-radius: 36rpx 36rpx 36rpx 36rpx;
|
||||||
background-color: #F1F1F1;
|
background-color: #F1F1F1;
|
||||||
|
word-break: break-word;
|
||||||
}
|
}
|
||||||
|
|
||||||
.act {
|
.act {
|
||||||
|
|
|
@ -148,14 +148,15 @@
|
||||||
<view class="" v-if="showSet">
|
<view class="" v-if="showSet">
|
||||||
<view class="" v-for="(item,index) in formData.attrValue.filter(item=> item.is_use==0)">
|
<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'>
|
<view class="" v-if='formData.attrValue.filter(item=> item.is_use==0).length==1'>
|
||||||
<u-form-item v-if='isWholeSale' label="批发价格" label-width="auto" labelPosition="left"
|
<u-form-item v-if='isWholeSale == 2 || isWholeSale == 1' label="批发价格" label-width="auto"
|
||||||
border-bottom>
|
labelPosition="left" border-bottom>
|
||||||
<view style="font-size: 28rpx;color:#777777 ;width: 100%;text-align: right;">
|
<view style="font-size: 28rpx;color:#777777 ;width: 100%;text-align: right;">
|
||||||
{{item.wholesale_price}}元/{{item.wholesale_unit_name}}
|
{{item.wholesale_price}}元/{{item.wholesale_unit_name}}
|
||||||
</view>
|
</view>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
|
|
||||||
<u-form-item v-else label="零售价格" label-width="auto" labelPosition="left" border-bottom>
|
<u-form-item v-if='isWholeSale == 2 || isWholeSale == 0' label="零售价格" label-width="auto"
|
||||||
|
labelPosition="left" border-bottom>
|
||||||
<view style="font-size: 28rpx;color:#777777 ;width: 100%;text-align: right;">
|
<view style="font-size: 28rpx;color:#777777 ;width: 100%;text-align: right;">
|
||||||
{{item.price}}元/{{item.unit_name}}
|
{{item.price}}元/{{item.unit_name}}
|
||||||
</view>
|
</view>
|
||||||
|
@ -169,7 +170,7 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="" v-else>
|
<view class="" v-else>
|
||||||
<u-form-item :label="item.sku" label-width="350rpx" prop="userInfo.name" ref="item1"
|
<u-form-item :label="item.sku" label-width="350rpx" prop="userInfo.name" ref="item1"
|
||||||
labelPosition="left" border-bottom>
|
labelPosition="left" border-bottom v-if='isWholeSale == 2 || isWholeSale == 0'>
|
||||||
<view class="" style="display: flex;justify-content: space-between;width: 100%">
|
<view class="" style="display: flex;justify-content: space-between;width: 100%">
|
||||||
<view style="font-size: 28rpx;color:#777777 ;">
|
<view style="font-size: 28rpx;color:#777777 ;">
|
||||||
零售价
|
零售价
|
||||||
|
@ -179,8 +180,9 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
|
|
||||||
<u-form-item label=" " label-width="350rpx" prop="userInfo.name" ref="item1"
|
<u-form-item label=" " label-width="350rpx" prop="userInfo.name" ref="item1"
|
||||||
labelPosition="left" border-bottom v-if='isWholeSale'>
|
labelPosition="left" border-bottom v-if='isWholeSale == 2 || isWholeSale == 1'>
|
||||||
<view class="" style="display: flex;justify-content: space-between;width: 100%">
|
<view class="" style="display: flex;justify-content: space-between;width: 100%">
|
||||||
<view style="font-size: 28rpx;color:#777777 ;">
|
<view style="font-size: 28rpx;color:#777777 ;">
|
||||||
批发价
|
批发价
|
||||||
|
@ -312,7 +314,7 @@
|
||||||
show: false, //选择图片还是视屏
|
show: false, //选择图片还是视屏
|
||||||
showSet: false,
|
showSet: false,
|
||||||
delivery_way: [],
|
delivery_way: [],
|
||||||
isWholeSale: false,
|
isWholeSale: '',
|
||||||
formData: {
|
formData: {
|
||||||
store_info: "",
|
store_info: "",
|
||||||
product_id: "",
|
product_id: "",
|
||||||
|
@ -493,7 +495,6 @@
|
||||||
uni.previewImage({
|
uni.previewImage({
|
||||||
urls: [url],
|
urls: [url],
|
||||||
});
|
});
|
||||||
|
|
||||||
},
|
},
|
||||||
deleteImage(index) {
|
deleteImage(index) {
|
||||||
// this.addGoodsSecoundData.video_link = '';
|
// this.addGoodsSecoundData.video_link = '';
|
||||||
|
@ -525,7 +526,6 @@
|
||||||
this.uploadVideo()
|
this.uploadVideo()
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
// 选择图片
|
// 选择图片
|
||||||
|
@ -543,9 +543,7 @@
|
||||||
that.$set(that.formData.imageList, that.formData.imageList.length, res.data.path.replace(
|
that.$set(that.formData.imageList, that.formData.imageList.length, res.data.path.replace(
|
||||||
/\\/g,
|
/\\/g,
|
||||||
""));
|
""));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// that.formData.imageList.push(res.data.path);
|
// that.formData.imageList.push(res.data.path);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -717,11 +715,13 @@
|
||||||
|
|
||||||
|
|
||||||
async initFormData(option) {
|
async initFormData(option) {
|
||||||
if (this.$store.state.app.userInfo?.mer_info?.wholesale == 0) {
|
// if (this.$store.state.app.userInfo?.mer_info?.wholesale == 0) {
|
||||||
this.isWholeSale = false;
|
// this.isWholeSale = false;
|
||||||
} else {
|
// } else {
|
||||||
this.isWholeSale = true;
|
// this.isWholeSale = true;
|
||||||
}
|
// }
|
||||||
|
this.isWholeSale = this.$store.state.app.userInfo?.mer_info?.wholesale;
|
||||||
|
|
||||||
|
|
||||||
this.mer_id = option.mer_id
|
this.mer_id = option.mer_id
|
||||||
if (option.formData) {
|
if (option.formData) {
|
||||||
|
@ -742,7 +742,6 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
onLoad(option) {
|
onLoad(option) {
|
||||||
this.initFormData(option)
|
this.initFormData(option)
|
||||||
this.showSet = option.showSet ? JSON.parse(option.showSet) : this.showSet
|
this.showSet = option.showSet ? JSON.parse(option.showSet) : this.showSet
|
||||||
|
@ -781,7 +780,6 @@
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
onBackPress: function(e) {
|
onBackPress: function(e) {
|
||||||
this.showlay = true
|
this.showlay = true
|
||||||
|
@ -799,7 +797,6 @@
|
||||||
padding-bottom: 280rpx;
|
padding-bottom: 280rpx;
|
||||||
padding: 20rpx 20rpx 200rpx 20rpx;
|
padding: 20rpx 20rpx 200rpx 20rpx;
|
||||||
|
|
||||||
|
|
||||||
.card {
|
.card {
|
||||||
background-color: white;
|
background-color: white;
|
||||||
padding: 28rpx 30rpx;
|
padding: 28rpx 30rpx;
|
||||||
|
@ -819,11 +816,8 @@
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding: 20rpx 0;
|
padding: 20rpx 0;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.tips {
|
.tips {
|
||||||
color: #777777;
|
color: #777777;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
|
@ -860,7 +854,6 @@
|
||||||
padding: 70rpx 0 40rpx 0;
|
padding: 70rpx 0 40rpx 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.jiao {
|
.jiao {
|
||||||
image {
|
image {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
@ -882,7 +875,6 @@
|
||||||
.preview_video {
|
.preview_video {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
background-color: red;
|
background-color: red;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.content_list_video {
|
.content_list_video {
|
||||||
|
@ -894,7 +886,6 @@
|
||||||
.content_list_video_title {
|
.content_list_video_title {
|
||||||
/* padding-top: 10rpx; */
|
/* padding-top: 10rpx; */
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.video-count {
|
.video-count {
|
||||||
|
@ -921,7 +912,6 @@
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
/* position: absolute; */
|
/* position: absolute; */
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.image-play-icon {
|
.image-play-icon {
|
||||||
|
|
|
@ -13,22 +13,24 @@
|
||||||
<u-line direction="row" style="margin: 30rpx 0;" color="#ECECEC"></u-line>
|
<u-line direction="row" style="margin: 30rpx 0;" color="#ECECEC"></u-line>
|
||||||
|
|
||||||
<view class="">
|
<view class="">
|
||||||
|
<view class="" v-if='isWholeSale == 1 || isWholeSale == 2'
|
||||||
<view class="" v-if='isWholeSale'
|
style="display: flex;align-items: center;justify-content: space-between;margin-top: 30rpx;margin-bottom: 20rpx;">
|
||||||
style="display: flex;align-items: center;justify-content: space-between;margin-top: 30rpx;">
|
<u--input style="flex: 2; background-color: #F6F6F6;" placeholder="请输入批发价格"
|
||||||
<u--input style="flex: 2; background-color: #F6F6F6;" placeholder="请输批发价格"
|
placeholderStyle="font-size:26rpx;color:rgb(192, 196, 204);" v-model="item.wholesale_price"
|
||||||
v-model="item.wholesale_price" type='number'></u--input>
|
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,true)" style="width: 100rpx;flex: 2.4">
|
<view class="" @click="unitIptClick(index,true)" style="width: 100rpx;flex: 2.4">
|
||||||
<u--input style="background-color: #F6F6F6;pointer-events: none;" readonly placeholder="请输入计量单位"
|
<u--input style="background-color: #F6F6F6;pointer-events: none;" readonly placeholder="请输入计量单位"
|
||||||
|
placeholderStyle="font-size:26rpx;color:rgb(192, 196, 204);"
|
||||||
v-model="item.wholesale_unit_name"></u--input>
|
v-model="item.wholesale_unit_name"></u--input>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view v-else class="" style="display: flex;align-items: center;justify-content: space-between;">
|
<view v-if='isWholeSale == 0 || isWholeSale == 2' class=""
|
||||||
<u--input style="flex: 2; background-color: #F6F6F6;" placeholder="请输入商品单价" v-model="item.price"
|
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>
|
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;">
|
||||||
/
|
/
|
||||||
|
@ -171,7 +173,6 @@
|
||||||
wholesale_price: '批发价格不能为空',
|
wholesale_price: '批发价格不能为空',
|
||||||
wholesale_unit_name: '批发单位不能为空',
|
wholesale_unit_name: '批发单位不能为空',
|
||||||
stock: '库存不能为空',
|
stock: '库存不能为空',
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -255,10 +256,19 @@
|
||||||
submit() {
|
submit() {
|
||||||
// 校验
|
// 校验
|
||||||
let errList = []
|
let errList = []
|
||||||
if (!this.isWholeSale) {
|
// if (!this.isWholeSale) {
|
||||||
|
// delete this.rules.wholesale_unit_name
|
||||||
|
// delete this.rules.wholesale_price
|
||||||
|
// }
|
||||||
|
|
||||||
|
if (this.isWholeSale == 0) { //零售
|
||||||
delete this.rules.wholesale_unit_name
|
delete this.rules.wholesale_unit_name
|
||||||
delete this.rules.wholesale_price
|
delete this.rules.wholesale_price
|
||||||
|
} else if (this.isWholeSale == 1) { //批发
|
||||||
|
delete this.rules.price;
|
||||||
|
delete this.rules.unit_name;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.attrValue.forEach(item => {
|
this.attrValue.forEach(item => {
|
||||||
for (let key in this.rules) {
|
for (let key in this.rules) {
|
||||||
if (!item[key]) {
|
if (!item[key]) {
|
||||||
|
@ -313,12 +323,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(option) {
|
onLoad(option) {
|
||||||
if (this.$store.state.app.userInfo?.mer_info?.wholesale == 2 || this.$store.state.app.userInfo?.mer_info
|
this.isWholeSale = this.$store.state.app.userInfo?.mer_info?.wholesale
|
||||||
?.wholesale == 1) {
|
|
||||||
this.isWholeSale = true;
|
|
||||||
} else {
|
|
||||||
this.isWholeSale = false;
|
|
||||||
}
|
|
||||||
this.initFomrData(option)
|
this.initFomrData(option)
|
||||||
this.attrValue = this.formData.attrValue
|
this.attrValue = this.formData.attrValue
|
||||||
this.attrValue.forEach(item => {
|
this.attrValue.forEach(item => {
|
||||||
|
@ -402,10 +407,11 @@
|
||||||
.goods-leval-li {
|
.goods-leval-li {
|
||||||
margin-right: 20rpx;
|
margin-right: 20rpx;
|
||||||
padding: 10rpx 40rpx;
|
padding: 10rpx 40rpx;
|
||||||
height: 60rpx;
|
/* height: 60rpx; */
|
||||||
margin-bottom: 20rpx;
|
margin-bottom: 20rpx;
|
||||||
border-radius: 36rpx 36rpx 36rpx 36rpx;
|
border-radius: 36rpx 36rpx 36rpx 36rpx;
|
||||||
background-color: #F1F1F1;
|
background-color: #F1F1F1;
|
||||||
|
word-break: break-word;
|
||||||
}
|
}
|
||||||
|
|
||||||
.act {
|
.act {
|
||||||
|
|
|
@ -309,8 +309,6 @@
|
||||||
merchantInfoAPI({
|
merchantInfoAPI({
|
||||||
id
|
id
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
console.log(res)
|
|
||||||
|
|
||||||
this.mer_name = res.data.mer_name
|
this.mer_name = res.data.mer_name
|
||||||
this.category_name = res.data.merchantCategory.category_name
|
this.category_name = res.data.merchantCategory.category_name
|
||||||
// this.images[0].img = res.data.mer_banner
|
// this.images[0].img = res.data.mer_banner
|
||||||
|
@ -360,7 +358,7 @@
|
||||||
this.cruxText = res.data.mer_keyword
|
this.cruxText = res.data.mer_keyword
|
||||||
|
|
||||||
if (!res.data.mer_address) {
|
if (!res.data.mer_address) {
|
||||||
this.selfLocation();
|
// this.selfLocation();
|
||||||
} else {
|
} else {
|
||||||
this.mer_address = res.data.mer_address;
|
this.mer_address = res.data.mer_address;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue