yangc 7 years ago
parent
commit
91cb634247

+ 7 - 1
components/applyPurchase/ApplyInfo.vue

@@ -156,7 +156,7 @@
           <div class="content-line" v-for="(reply, index) in sayPriceObj.replies">
             <div class="form-item form-left">
               <span><i>*</i>价格梯度:</span>
-              <input type="number" class="form-control" @blur="onReplyLapQtyBlur(index)" v-model="reply.lapQty" placeholder="数量">
+              <input type="number" class="form-control" @blur="onReplyLapQtyBlur(index)" @input="onReplyLapQtyInput(index)" v-model="reply.lapQty" placeholder="数量">
               <!-- -
                <input type="text" class="form-control" placeholder="数量">-->
             </div>
@@ -422,6 +422,12 @@
           this.validSayPrice.repliesLapQty = true
         }
       },
+      onReplyLapQtyInput: function (index) {
+        let lapQty = this.sayPriceObj.replies[index].lapQty
+        if (lapQty.length >= 9) {
+          this.sayPriceObj.replies[index].lapQty = lapQty.substring(0, 8)
+        }
+      },
       getLimitDownQty: function () {
         for (let i = 0; i < this.sayPriceObj.replies.length; i++) {
           if (this.sayPriceObj.replies[i].lapQty) {

+ 9 - 5
components/applyPurchase/BatchPublish.vue

@@ -115,6 +115,7 @@
             :picker-options="pickerOptions"
             :editable="false"
             :class="{'error': !validObj.deadline}"
+            @change="getDate1()"
             size="mini">
           </el-date-picker>
           <!--<input type="text" class="form-control" v-model="modifyObj.deadline">-->
@@ -136,7 +137,7 @@
     <div class="modal-wrap" v-if="showRemindBox">
       <div class="apply-del-box">
         <div class="title">
-          <a @click="showRemindBox = false"><i class="fa fa-close fa-lg"></i></a>
+          <!--<a @click="showRemindBox = false"><i class="fa fa-close fa-lg"></i></a>-->
         </div>
         <div class="content">
           <!--<p style="line-height: 20px;margin-top: 10px;padding:0 10px">非常抱歉,目前暂无此品牌!<br>若直接前往“品牌申请”,我们将为您先开通寄售功能,待申请通过后再提交开店申请。</p>-->
@@ -144,7 +145,7 @@
           <p><img src="/images/applyPurchase/check.png" alt="">成功发布{{successResult.successAmount || 0}}个</p>
           <p v-if="successResult.goodsAmount && successResult.goodsAmount > 0 ">其中<span>{{successResult.goodsAmount || 0}}</span>个求购型号有现货在售,您可前往“<span>买家中心-我的求购</span>”查询并直接购买</p>
           <div>
-            <a @click="showRemindBox = false">继续发布</a>
+            <!--<a @click="showRemindBox = false">继续发布</a>-->
             <a href="/user#/seekPurchase" target="_blank">前往我的求购</a>
           </div>
         </div>
@@ -175,7 +176,7 @@
   }
   let formatDate = function (date, fmt) {
     if (typeof date === 'string') {
-      date = new Date(date)
+      date = new Date(Date.parse(date.replace(/-/g, '/')))
     }
     let o = {
       'M+': date.getMonth() + 1, // 月份
@@ -286,6 +287,9 @@
       }
     },
     methods: {
+      getDate1: function () {
+        this.modifyObj.deadline = formatDate(this.modifyObj.deadline, 'yyyy-MM-dd hh:mm:ss')
+      },
       initModifyObj: function () {
         this.modifyObj = {
           code: '',
@@ -469,14 +473,14 @@
       },
       isValidTime: function (time) {
         let now = new Date().getTime()
-        return !time || (time >= now && time <= now + 1000 * 60 * 60 * 24 * 90)
+        return !time || (time >= now && time <= now + 1000 * 60 * 60 * 24 * 91)
       },
       isValidDate: function (date) {
         date = formatDate(date, 'yyyy-MM-dd hh:mm:ss')
         this.modifyObj.deadline = date
         let now = new Date().getTime()
         let time = new Date(date).getTime()
-        return !time || (time >= now && time <= now + 1000 * 60 * 60 * 24 * 90)
+        return !time || (time >= now && time <= now + 1000 * 60 * 60 * 24 * 91)
       },
       getSimilarCode: function () {
         this.$http.get('/search/similarComponents', {params: {keyword: this.modifyObj.code}})