|
@@ -1,8 +1,5 @@
|
|
|
<template>
|
|
<template>
|
|
|
<view class="item-cmd_bx" @click="customNum">
|
|
<view class="item-cmd_bx" @click="customNum">
|
|
|
- <!-- <view class="img_bx" @click="addEvents">-->
|
|
|
|
|
- <!-- <app-img :src="info.cover" alt="商品图" mode="aspectFit" :height="160" />-->
|
|
|
|
|
- <!-- </view>-->
|
|
|
|
|
<view class="img_bx" style="background:#eeeeee" @click.stop="showBigImg">
|
|
<view class="img_bx" style="background:#eeeeee" @click.stop="showBigImg">
|
|
|
<image :src="info.cover" v-if="isImg"></image>
|
|
<image :src="info.cover" v-if="isImg"></image>
|
|
|
</view>
|
|
</view>
|
|
@@ -30,7 +27,7 @@
|
|
|
</text>
|
|
</text>
|
|
|
<i class="iconfont iconzeng" :class="addAnimationData?'animation':''" @click.stop="addEvents"></i>
|
|
<i class="iconfont iconzeng" :class="addAnimationData?'animation':''" @click.stop="addEvents"></i>
|
|
|
</view>
|
|
</view>
|
|
|
- <text style="padding-right: 55rpx">还剩 {{ info.stock }}</text>
|
|
|
|
|
|
|
+ <text style="padding-right: 55rpx">还剩 {{ currentStock }}</text>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="num-open_bx flex-space" v-if="type == COMMODITY_TYPE.CHANGE">
|
|
<view class="num-open_bx flex-space" v-if="type == COMMODITY_TYPE.CHANGE">
|
|
@@ -105,22 +102,24 @@ export default {
|
|
|
type: Boolean,
|
|
type: Boolean,
|
|
|
default: false
|
|
default: false
|
|
|
},
|
|
},
|
|
|
|
|
+ showMaxStock:{
|
|
|
|
|
+ type:Number,
|
|
|
|
|
+ default:0
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
COMMODITY_TYPE,
|
|
COMMODITY_TYPE,
|
|
|
- // isAllActive: false,
|
|
|
|
|
- // isAllFocus: false,
|
|
|
|
|
isImg:false,
|
|
isImg:false,
|
|
|
isAlterMoney:false,
|
|
isAlterMoney:false,
|
|
|
isAloneAllActive: false,
|
|
isAloneAllActive: false,
|
|
|
isAloneAllFocus: false,
|
|
isAloneAllFocus: false,
|
|
|
-
|
|
|
|
|
isShowSucceed:false,
|
|
isShowSucceed:false,
|
|
|
changeAutoPrice:'',
|
|
changeAutoPrice:'',
|
|
|
showPrice:0.00,
|
|
showPrice:0.00,
|
|
|
oldPrice:0.00,
|
|
oldPrice:0.00,
|
|
|
- ifFocus:false
|
|
|
|
|
|
|
+ ifFocus:false,
|
|
|
|
|
+ currentStock:0
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
created() {},
|
|
created() {},
|
|
@@ -133,6 +132,12 @@ export default {
|
|
|
}
|
|
}
|
|
|
this.showPrice = this.info.price;
|
|
this.showPrice = this.info.price;
|
|
|
this.oldPrice = (Number(this.info.cost) + Number(this.info.addPrice)).toFixed(2)
|
|
this.oldPrice = (Number(this.info.cost) + Number(this.info.addPrice)).toFixed(2)
|
|
|
|
|
+
|
|
|
|
|
+ this.currentStock = this.info.stock
|
|
|
|
|
+ if(this.info.stock > this.showMaxStock){
|
|
|
|
|
+ this.currentStock = this.showMaxStock
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
//input点击删除按键
|
|
//input点击删除按键
|