shish 4 سال پیش
والد
کامیت
84c386feb7
2فایلهای تغییر یافته به همراه1 افزوده شده و 27 حذف شده
  1. 0 26
      ghsApp/src/admin/item/detail.vue
  2. 1 1
      hdApp/src/components/module/app-commodity.vue

+ 0 - 26
ghsApp/src/admin/item/detail.vue

@@ -58,21 +58,6 @@
           />
         </tui-list-cell>
 
-
-        <tui-list-cell class="line-cell" :hover="false">
-          <div class="tui-title">大众价</div>
-          <input
-            v-model="form.skPrice"
-            placeholder-class="phcolor"
-            class="tui-input"
-            name="skPrice"
-            @focus="form.skPrice=''"
-            placeholder="请输入大众价"
-            maxlength="50"
-            type="digit"
-          />
-        </tui-list-cell>
-
         <tui-list-cell class="line-cell" :hover="false">
           <div class="tui-title">库存</div>
           <input v-model="form.stock" style="width:340rpx;" placeholder-class="phcolor" @focus="form.stock=''" @input="changeStock($event)" class="tui-input" name="stock" placeholder="请输入" type="digit"/>
@@ -249,7 +234,6 @@ export default {
         price:'',
         addPrice:'',
         discountPrice:'',
-        skPrice:'',
         weight:'',
         cover:'',
         stockWarning:'',
@@ -346,7 +330,6 @@ export default {
         this.form.price = ''
         this.form.addPrice =''
         this.form.discountPrice = ''
-        this.form.skPrice = ''
       })
     },
     getDetail() {
@@ -438,10 +421,6 @@ export default {
 					uni.showToast({title:"请填写特价,没有特价请填0",icon:"none"})
 					return;
 				}
-				if(/(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/.test(this.form.skPrice) == false){
-					uni.showToast({title:"请填写大众价",icon:"none"})
-					return;
-				}
 				if(/(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/.test(this.form.price) == false){
 					uni.showToast({title:"请填写售价",icon:"none"})
 					return;
@@ -517,11 +496,6 @@ export default {
           rule: ["required"],
           msg: ["不做特价请填0"]
         },
-        {
-          name: "skPrice",
-          rule: ["required"],
-          msg: ["请输入大众价"]
-        },
         {
           name: "weight",
           rule: ["required"],

+ 1 - 1
hdApp/src/components/module/app-commodity.vue

@@ -9,7 +9,7 @@
 				<view v-if="!offPrice">
 					<view class="flex-space" style="margin-top:20rpx" v-if="Number(info.discountPrice)>0">
 						<view style="padding:2rpx 10rpx 5rpx 10rpx;text-align: center;color: red;border: 1px solid red;margin-right: 20rpx;line-height: 1;font-size: 20rpx">
-							{{((Number(info.discountPrice)/Number(info.prePrice)).toFixed(2)*10).toFixed(1)+'折'}}
+							{{parseFloat(((Number(info.discountPrice)/Number(info.prePrice)).toFixed(2)*10).toFixed(1))+'折'}}
 						</view>
 						<text style="text-decoration:line-through;color:#A9A9A9">¥{{parseFloat(info.prePrice)}}</text>
 					</view>