团购产品配置基本信息,添加原价

huipay-h5
游梦婷 1 year ago
parent 4db880f828
commit 698a728b86
  1. 4
      subpackages/groupBuyingConfiguration/groupProduct/groupProduct.vue
  2. 19
      subpackages/groupBuyingConfiguration/groupProduct/groupProductAdd.vue

@ -42,6 +42,10 @@
<view class=" fotct fontwig6 backcor6 titleWidth minheight40">价格</view> <view class=" fotct fontwig6 backcor6 titleWidth minheight40">价格</view>
<view class="flex-1 fotct ">{{productDetail.price}}</view> <view class="flex-1 fotct ">{{productDetail.price}}</view>
</view> </view>
<view class="width100 dis-flex bor-botm1">
<view class=" fotct fontwig6 backcor6 titleWidth minheight40">原价</view>
<view class="flex-1 fotct ">{{productDetail.originalPrice}}</view>
</view>
<view class="width100 dis-flex bor-botm1"> <view class="width100 dis-flex bor-botm1">
<view class=" fotct fontwig6 backcor6 titleWidth minheight40">限制</view> <view class=" fotct fontwig6 backcor6 titleWidth minheight40">限制</view>
<view class="flex-1 fotct ">{{productDetail.astrict}}</view> <view class="flex-1 fotct ">{{productDetail.astrict}}</view>

@ -25,6 +25,12 @@
<input type="digit" name="name" v-model.trim="productData.price" placeholder-class="corf6 font15" <input type="digit" name="name" v-model.trim="productData.price" placeholder-class="corf6 font15"
class=" flex-1 " placeholder="请输入团购价格(保留两位小数)"> class=" flex-1 " placeholder="请输入团购价格(保留两位小数)">
</view> </view>
<view class="dis-flex marb10 bor-botm1">
<view class="group-title marRight10 fontwig6 padleft15 paddtright10 flex-s0">团购原价:
</view>
<input type="digit" name="name" v-model.trim="productData.originalPrice" placeholder-class="corf6 font15"
class=" flex-1 " placeholder="请输入团购价格(保留两位小数)">
</view>
<view class="dis-flex marb10 bor-botm1"> <view class="dis-flex marb10 bor-botm1">
<view class="group-title marRight10 fontwig6 padleft15 paddtright10 flex-s0">使用时间: <view class="group-title marRight10 fontwig6 padleft15 paddtright10 flex-s0">使用时间:
</view> </view>
@ -180,6 +186,7 @@
productData: { // productData: { //
name: '', // name: '', //
price: '', // price: '', //
originalPrice:'',//
astrict: '', // astrict: '', //
storeId: '', //id storeId: '', //id
img: '', // img: '', //
@ -258,9 +265,18 @@
this.productData.price = ""; this.productData.price = "";
return false return false
} }
if (!reg.test(this.productData.originalPrice) || this.productData.originalPrice == 0) {
uni.showToast({
title: "请输入正确的金额格式",
icon: "none"
})
this.productData.originalPrice = "";
return false
}
if (!this.productData.name || !this.productData.price || !this.productData.astrict || !this.productData if (!this.productData.name || !this.productData.price || !this.productData.originalPrice || !this.productData.astrict || !this.productData
.serviceTime || !this.productData.validity) { .serviceTime || !this.productData.validity) {
uni.showToast({ uni.showToast({
title: "请填写完整哦!", title: "请填写完整哦!",
@ -323,6 +339,7 @@
this.productData.img = res.return_data.img; this.productData.img = res.return_data.img;
this.productData.serviceTime = res.return_data.serviceTime; this.productData.serviceTime = res.return_data.serviceTime;
this.productData.validity = res.return_data.validity; this.productData.validity = res.return_data.validity;
this.productData.originalPrice = res.return_data.originalPrice;
this.imgValue = this.productData.img.split(","); this.imgValue = this.productData.img.split(",");

Loading…
Cancel
Save