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