Browse Source

修改交期方案和输入交互

wangcz 7 years ago
parent
commit
3d32a20e5c

+ 4 - 4
components/applyPurchase/SayPrice.vue

@@ -61,8 +61,8 @@
           </template>
           <div class="content-line">
             <div class="form-item form-left">
-              <span><i>*</i>交期:</span>
-              <input type="number" class="form-control" placeholder="天数" @input="onLeadtimeInput" @blur="onLeadtimeBlur" v-model="sayPriceObj.leadtime">
+              <span><i>*</i>交期(天):</span>
+              <input type="number" class="form-control" placeholder="最长交期" @input="onLeadtimeInput" @blur="onLeadtimeBlur" v-model="sayPriceObj.leadtime">
             </div>
             <div class="form-item form-right">
               <span><i>*</i>税率:</span>
@@ -244,7 +244,7 @@
         }
       },
       onLeadtimeInput: function () {
-        this.sayPriceObj.leadtime = this.sayPriceObj.leadtime.replace(/[^\-?\d.]/g, '')
+        this.sayPriceObj.leadtime = this.sayPriceObj.leadtime.replace(/[^\d]/g, '')
         if (this.sayPriceObj.leadtime.length > 3) {
           this.sayPriceObj.leadtime = this.sayPriceObj.leadtime.substring(0, 3)
         }
@@ -258,7 +258,7 @@
         }
       },
       onTaxrateInput () {
-        this.sayPriceObj.taxrate = this.sayPriceObj.taxrate.replace(/[^\-?\d.]/g, '')
+        this.sayPriceObj.taxrate = this.sayPriceObj.taxrate.replace(/[^\d]/g, '')
         if (this.sayPriceObj.taxrate.length > 2) {
           this.sayPriceObj.taxrate = this.sayPriceObj.taxrate.substring(0, 2)
         }

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

@@ -77,7 +77,7 @@
             </div>
             <div class="date">
               <span>交期(天)</span>
-              <input type="text" 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>
             <div class="date">
               <span>税率</span>
@@ -253,7 +253,7 @@
         }
       },
       onLeadtimeInput: function () {
-        this.sayPriceObj.leadtime = this.sayPriceObj.leadtime.replace(/[^\-?\d.]/g, '')
+        this.sayPriceObj.leadtime = this.sayPriceObj.leadtime.replace(/[^\d]/g, '')
         if (this.sayPriceObj.leadtime.length > 3) {
           this.sayPriceObj.leadtime = this.sayPriceObj.leadtime.substring(0, 3)
         }
@@ -267,7 +267,7 @@
         }
       },
       onTaxrateInput () {
-        this.sayPriceObj.taxrate = this.sayPriceObj.taxrate.replace(/[^\-?\d.]/g, '')
+        this.sayPriceObj.taxrate = this.sayPriceObj.taxrate.replace(/[^\d]/g, '')
         if (this.sayPriceObj.taxrate.length > 2) {
           this.sayPriceObj.taxrate = this.sayPriceObj.taxrate.substring(0, 2)
         }

+ 3 - 3
components/mobile/center/upoff-material.vue

@@ -71,10 +71,10 @@
                   </div>
                 </div>
                 <div class="pull-left" style="margin-left: 0.2rem">
-                  <span class="name">交期:</span>
-                  <input type="tel" placeholder="天数" v-model="chooseItem.goods.minDelivery" class="input startInput" maxlength="3" @blur="minDeliveryBlur(chooseItem.goods.minDelivery)" />
+                  <span class="name">交期(天):</span>
+                  <input type="tel" placeholder="最长交期" v-model="chooseItem.goods.minDelivery" class="input startInput" maxlength="3" @blur="minDeliveryBlur(chooseItem.goods.minDelivery)" />
                   -
-                  <input type="tel" placeholder="天数" v-model="chooseItem.goods.maxDelivery" class="input endInput" maxlength="3" @blur="minDeliveryBlur(chooseItem.goods.maxDelivery)"/>
+                  <input type="tel" placeholder="最长交期" v-model="chooseItem.goods.maxDelivery" class="input endInput" maxlength="3" @blur="minDeliveryBlur(chooseItem.goods.maxDelivery)"/>
                 </div>
               </div>
               <div class="off-info clearfix">

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

@@ -76,10 +76,10 @@
           </div>
         </div>
         <div class="pull-right">
-          <span class="name">交期:</span>
-          <input type="tel" placeholder="天数" v-model="chooseItem.minDelivery" class="input startInput" maxlength="3" @blur="minDeliveryBlur(chooseItem.minDelivery)" />
+          <span class="name">交期(天):</span>
+          <input type="tel" placeholder="最长交期" v-model="chooseItem.minDelivery" class="input startInput" maxlength="3" @blur="minDeliveryBlur(chooseItem.minDelivery)" />
           -
-          <input type="tel" placeholder="天数" v-model="chooseItem.maxDelivery" class="input endInput" maxlength="3" @blur="minDeliveryBlur(chooseItem.maxDelivery)"/>
+          <input type="tel" placeholder="最长交期" v-model="chooseItem.maxDelivery" class="input endInput" maxlength="3" @blur="minDeliveryBlur(chooseItem.maxDelivery)"/>
         </div>
       </div>
       <div class="list" style="border-bottom: 0px">