Browse Source

Merge remote-tracking branch 'origin/master'

yangc 7 years ago
parent
commit
599b40c58c

+ 2 - 2
components/mobile/applyPurchase/SayPrice.vue

@@ -290,10 +290,10 @@
         this.validSayPrice.repliesleadtime = true
         this.validSayPrice.repliesleadtime = true
         for (let i = 0; i < this.sayPriceObj.replies.length; i++) {
         for (let i = 0; i < this.sayPriceObj.replies.length; i++) {
           console.log(this.sayPriceObj.replies)
           console.log(this.sayPriceObj.replies)
-          if (!/^\d+$/.test(this.sayPriceObj.replies[i].lapQty) || this.sayPriceObj.replies[i].lapQty === '') {
+          if (!/^[0-9]+([.]{1}[0-9]+)?$/.test(this.sayPriceObj.replies[i].lapQty) || this.sayPriceObj.replies[i].lapQty === '') {
             this.validSayPrice.repliesLapQty = false
             this.validSayPrice.repliesLapQty = false
             break
             break
-          } else if (!/^\d+$/.test(this.sayPriceObj.replies[i].price) || this.sayPriceObj.replies[i].price === '') {
+          } else if (!/^[0-9]+([.]{1}[0-9]+)?$/.test(this.sayPriceObj.replies[i].price) || this.sayPriceObj.replies[i].price === '') {
             this.validSayPrice.repliesPrice = false
             this.validSayPrice.repliesPrice = false
             break
             break
           }
           }

+ 2 - 2
pages/mobile/center/vendor/productdetails.vue

@@ -100,10 +100,10 @@
         <li v-for="(item, index) in chooseItem.prices" v-bind:key="index">
         <li v-for="(item, index) in chooseItem.prices" v-bind:key="index">
           <div class="clearfix">
           <div class="clearfix">
             <div class="pull-left">
             <div class="pull-left">
-              <input type="number" placeholder="数量" class="otherNumber" :class="{firstNumber: index === 0}" v-model.lazy.trim="item.start" :disabled="index === 0" :readonly="index === 0" @blur="startpriceBlur(item, index)" maxlength="9"/>
+              <input oninput="if(value.length>5)value=value.slice(0,9)" type="number" placeholder="数量" class="otherNumber" :class="{firstNumber: index === 0}" v-model.lazy.trim="item.start" :disabled="index === 0" :readonly="index === 0" @blur="startpriceBlur(item, index)" maxlength="9"/>
               <label v-if="index !== chooseItem.prices.length - 1">-</label>
               <label v-if="index !== chooseItem.prices.length - 1">-</label>
               <label v-if="index === chooseItem.prices.length - 1">以上</label>
               <label v-if="index === chooseItem.prices.length - 1">以上</label>
-              <input type="number" placeholder="数量" class="otherNumber" v-model.lazy.trim="item.end" v-if="index !== chooseItem.prices.length - 1" @blur="endpriceBlur(item, index)" maxlength="9"/>
+              <input oninput="if(value.length>5)value=value.slice(0,9)" type="number" placeholder="数量" class="otherNumber" v-model.lazy.trim="item.end" v-if="index !== chooseItem.prices.length - 1" @blur="endpriceBlur(item, index)" maxlength="9"/>
             </div>
             </div>
             <div class="pull-right">
             <div class="pull-right">
               <template v-if="chooseItem.currencyName == 'RMB'">
               <template v-if="chooseItem.currencyName == 'RMB'">