|
@@ -43,7 +43,7 @@
|
|
|
v-model="productCount"
|
|
|
maxlength="4"
|
|
|
@blur="changeNumber($event)"
|
|
|
- cursor-spacing="40"
|
|
|
+ cursor-spacing="120"
|
|
|
/>
|
|
|
<view
|
|
|
class="iconfont icon-jiahao"
|
|
@@ -207,13 +207,23 @@ export default {
|
|
|
} else if (_value < this.handleMinNumber) {
|
|
|
this.$util.msg(`该商品最小起订量为${this.handleMinNumber}`, 2000)
|
|
|
this.productCount = this.handleMinNumber
|
|
|
- } else if (_value % this.handleMinNumber != 0) {
|
|
|
- this.$util.msg('购买量必须为起订量的整数倍', 2000)
|
|
|
- this.productCount = this.handleMinNumber
|
|
|
- } else if (_value > this.handleStock) {
|
|
|
- this.productCount = this.handleStock
|
|
|
} else {
|
|
|
- this.productCount = e.detail.value
|
|
|
+ if (this.skuProduct.step == 2) {
|
|
|
+ if (_value % this.handleMinNumber != 0) {
|
|
|
+ this.$util.msg('购买量必须为起订量的整数倍', 2000)
|
|
|
+ this.productCount = this.handleMinNumber
|
|
|
+ } else if (_value > this.handleStock) {
|
|
|
+ this.productCount = this.handleStock
|
|
|
+ } else {
|
|
|
+ this.productCount = _value
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ if (_value > this.handleStock) {
|
|
|
+ this.productCount = this.handleStock
|
|
|
+ } else {
|
|
|
+ this.productCount = _value
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
this.totalLadderPrice()
|
|
|
},
|