shish пре 3 година
родитељ
комит
8e84a1b6e9
1 измењених фајлова са 4 додато и 15 уклоњено
  1. 4 15
      ghsApp/src/admin/changePrice/components/Item.vue

+ 4 - 15
ghsApp/src/admin/changePrice/components/Item.vue

@@ -15,10 +15,10 @@
 					<view class="open-bx" >
 						<text style="color:#333333;">¥{{ parseFloat(info.skPrice) }}</text>
 						<view class="hd-price-area">
-							<input class="change-input" @click.stop @blur="savePrice" @focus="modifyPrice = ''" placeholder-style="color:#CCCCCC" v-model="modifyPrice" type="digit" placeholder="花店价" />
+							<input class="change-input" @click.stop @blur="savePrice" placeholder-style="color:#CCCCCC" v-model="modifyPrice" type="digit" placeholder="花店价" />
 						</view>
 						<view class="sk-price-area">
-							<input class="change-input" @click.stop @blur="saveSkPrice" @focus="skModifyPrice = ''" placeholder-style="color:#CCCCCC" v-model="skModifyPrice" type="digit" placeholder="散客价" />
+							<input class="change-input" @click.stop @blur="saveSkPrice" placeholder-style="color:#CCCCCC" v-model="skModifyPrice" type="digit" placeholder="散客价" />
 						</view>
 						<button v-if="Number(info.discountPrice)>0" @click.stop="cancelDiscountFn(info)" class="admin-button-com mini-btn blue" 
 							style="position:absolute;bottom:-69upx;font-size:24upx;left:10upx;">取消特价</button>
@@ -29,7 +29,7 @@
 	</view>
 
 	<view class="level-price">
-		<text>剩余 {{showStock}}</text>
+		<text>剩余 {{info.stock?parseFloat(info.stock):0}}</text>
 		<text style="color:#333333;position:absolute;right:80upx;color:green;">成本 ¥{{ parseFloat(info.cost) }}</text>
 	</view>
 
@@ -56,8 +56,7 @@ export default {
 	data() {
 		return {
 			modifyPrice:'',
-			skModifyPrice:'',
-			showStock:''
+			skModifyPrice:''
 		};
 	},
 	watch: {
@@ -69,16 +68,6 @@ export default {
 		}
 	},
 	mounted(){
-		let info = this.info
-		this.showStock = ''
-		if(Number(info.stock)>0){
-			this.showStock += Math.trunc(info.stock)+info.bigUnit
-		}
-		let decimal = Number(info.stock) - Math.trunc(info.stock)
-		decimal = decimal.toFixed(2)
-		if(decimal > 0){
-			this.showStock += parseFloat((decimal*info.ratio).toFixed(2))+info.smallUnit
-		}
 	},
 	methods: {
 		cancelDiscountFn(item){