|
|
@@ -39,14 +39,14 @@
|
|
|
</span>
|
|
|
</div>
|
|
|
<div class="form-item" v-for="(reply, index) in sayPriceObj.replies">
|
|
|
- <input type="number" placeholder="梯度" class="fl" @blur="onReplyLapQtyBlur(index)" @input="onReplyLapQtyInput(index)" v-model="reply.lapQty">
|
|
|
- <input type="number" placeholder="单价" class="fr" @input="onReplyPriceInput(index)" @blur="onReplyPriceBlur(index)" v-model="reply.price">
|
|
|
+ <input type="text" placeholder="梯度" class="fl" @blur="onReplyLapQtyBlur(index)" @input="onReplyLapQtyInput(index)" v-model="reply.lapQty">
|
|
|
+ <input type="text" placeholder="单价" class="fr" @input="onReplyPriceInput(index)" @blur="onReplyPriceBlur(index)" v-model="reply.price">
|
|
|
<i class="iconfont icon-minus" v-if="index > 0" @click="setReplies('sub', index)"></i>
|
|
|
<i class="iconfont icon-add" v-if="index == 0 && sayPriceObj.replies.length < 5" @click="setReplies('add', index)"></i>
|
|
|
</div>
|
|
|
<div class="date">
|
|
|
<span>交期(天)</span>
|
|
|
- <input type="number" placeholder="最大值" @input="onLeadtimeInput" @blur="onLeadtimeBlur" v-model="sayPriceObj.leadtime" class="fr">
|
|
|
+ <input type="text" placeholder="最大值" @input="onLeadtimeInput" @blur="onLeadtimeBlur" v-model="sayPriceObj.leadtime" class="fr">
|
|
|
</div>
|
|
|
<a class="say-price-btn" @click="commitSayPrice">确定</a>
|
|
|
</div>
|
|
|
@@ -190,6 +190,7 @@
|
|
|
}
|
|
|
},
|
|
|
onLeadtimeInput: function () {
|
|
|
+ this.sayPriceObj.leadtime = this.sayPriceObj.leadtime.replace(/[^\-?\d.]/g, '')
|
|
|
if (this.sayPriceObj.leadtime.length > 3) {
|
|
|
this.sayPriceObj.leadtime = this.sayPriceObj.leadtime.substring(0, 3)
|
|
|
}
|
|
|
@@ -203,6 +204,7 @@
|
|
|
}
|
|
|
},
|
|
|
onReplyPriceInput: function (index) {
|
|
|
+ this.sayPriceObj.replies[index].price = this.sayPriceObj.replies[index].price.replace(/[^\-?\d.]/g, '')
|
|
|
let price = this.sayPriceObj.replies[index].price
|
|
|
if (price >= 10000) {
|
|
|
this.sayPriceObj.replies[index].price = price.substring(0, 4)
|
|
|
@@ -249,6 +251,7 @@
|
|
|
}
|
|
|
},
|
|
|
onReplyLapQtyInput: function (index) {
|
|
|
+ this.sayPriceObj.replies[index].lapQty = this.sayPriceObj.replies[index].lapQty.replace(/[^\-?\d.]/g, '')
|
|
|
let lapQty = this.sayPriceObj.replies[index].lapQty
|
|
|
if (lapQty.length > 9) {
|
|
|
this.sayPriceObj.replies[index].lapQty = lapQty.substring(0, 9)
|