Browse Source

请求添加/

yangc 7 years ago
parent
commit
9e7f2a1350

+ 1 - 77
assets/scss/mobileCommon.scss

@@ -115,16 +115,6 @@ html {
     border: none;
   }
 
-  /*loading优先级*/
-  //.loading {
-  //  z-index: 100000 !important;
-  //}
-  //
-  //.mobile-content {
-  //  padding-top: .88rem !important;
-  //  margin-bottom: 1rem;
-  //}
-
 
 
   /*search*/
@@ -181,7 +171,7 @@ html {
   //width: 7.17rem;
   margin: 0 auto .18rem;
   background: #fff;
-  padding: 0.1 .29rem;
+  padding: 0.1rem .29rem;
   .content-line {
     height: .46rem;
     line-height: .46rem;
@@ -346,69 +336,3 @@ html {
     }
   }
 }
-
-/*search*/
-//.search-content {
-//  padding-top: .15rem;
-//  input {
-//    width: 6.48rem;
-//    height: .58rem;
-//    border-radius: .14rem;
-//    margin: 0 0 0 .11rem;
-//    font-size: .23rem;
-//    padding: 0 0 0 .21rem;
-//  }
-//  span {
-//    display: inline-block;
-//    height: .58rem;
-//    line-height: .58rem;
-//    position: relative;
-//    top: .04rem;
-//    width: .68rem;
-//    color: #376ff3;
-//    border-left: .02rem solid #376ff3;
-//    margin-left: -.68rem;
-//    text-align: center;
-//    i {
-//      font-size: .3rem;
-//    }
-//  }
-//  img {
-//    width: .44rem;
-//    height: .44rem;
-//    float: right;
-//    margin-right: .2rem;
-//    margin-top: .1rem;
-//  }
-//}
-///*报价info*/
-//.base-info {
-//  //width: 7.17rem;
-//  margin: 0 auto .18rem;
-//  background: #fff;
-//  padding: 0 .29rem;
-//  .content-line {
-//    height: .5rem;
-//    line-height: .5rem;
-//    font-size: .28rem;
-//    overflow: hidden;
-//    text-overflow: ellipsis;
-//    white-space: nowrap;
-//    span {
-//      color: #666;
-//    }
-//  }
-//}
-//
-//.say-price-btn {
-//  display: block;
-//  width: 6.7rem;
-//  height: .74rem;
-//  line-height: .74rem;
-//  text-align: center;
-//  color: #fff !important;
-//  background: #3f84f6;
-//  border-radius: .08rem;
-//  font-size: .32rem;
-//  margin: 0 auto;
-//}

+ 1 - 1
components/applyPurchase/ApplyInfo.vue

@@ -205,7 +205,7 @@ export default {
       return this.$store.state.shop.storeInfo.store.data
     },
     purchaseManList() {
-      return this.$store.state.applyPurchase.purchaseManList.purchaseManList.data
+      return JSON.parse(JSON.stringify(this.$store.state.applyPurchase.purchaseManList.purchaseManList.data))
     },
     totalCount() {
       return this.purchaseManList.totalElements

+ 1 - 1
components/applyPurchase/BatchPublish.vue

@@ -914,7 +914,7 @@
         this.onInput(index)
       },
       buyNow: function (goods, index) {
-        this.$http.post('trade/order/buyNow', [{
+        this.$http.post('/trade/order/buyNow', [{
           uuid: goods.uuid,
           batchCode: goods.batchCode,
           number: this.fragments[index].num,

+ 0 - 467
components/applyPurchase/SayPrice.vue

@@ -1,467 +0,0 @@
-<template>
-  <div>
-    <div class="modal-wrap" v-if="currentSayPriceIndex > -1">
-      <div class="say-price-box" >
-        <div class="title">
-          <!--<div>型号:<span :title="purchaseManList.content[currentSayPriceIndex].cmpCode">{{purchaseManList.content[currentSayPriceIndex].cmpCode}}</span></div>-->
-          <!--<div>品牌:<span :title="purchaseManList.content[currentSayPriceIndex].inbrand">{{purchaseManList.content[currentSayPriceIndex].inbrand}}</span></div>-->
-          <div>我要报价</div>
-          <i class="fa fa-close" @click="cancelSayPrice"></i>
-        </div>
-        <div class="content">
-          <div class="content-line">
-            <div class="form-item form-left text-line">
-              <span>型号:</span><span class="text" :title="purchaseManList.content[currentSayPriceIndex].cmpCode">{{purchaseManList.content[currentSayPriceIndex].cmpCode}}</span>
-            </div>
-          </div>
-          <div class="content-line">
-            <div class="form-item form-left text-line">
-              <span>品牌:</span><span class="text"  :title="purchaseManList.content[currentSayPriceIndex].inbrand">{{purchaseManList.content[currentSayPriceIndex].inbrand}}</span>
-            </div>
-          </div>
-          <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">
-              <!-- -
-              <input type="text" class="form-control" placeholder="天数">-->
-            </div>
-            <!--<div class="form-item form-upload">
-              <label>
-                <span><i>+</i>添加附件</span>
-                <input type="file">
-              </label>
-              &lt;!&ndash;<div>
-                <span>我是Excel的名字111</span>
-                <i class="fa fa-times-circle"></i>
-                <a href="">更换</a>
-              </div>&ndash;&gt;
-            </div>-->
-          </div>
-          <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)" @input="onReplyLapQtyInput(index)" v-model="reply.lapQty" placeholder="数量">
-              <!-- -
-               <input type="text" class="form-control" placeholder="数量">-->
-            </div>
-            <div class="form-item form-right">
-              <span><i>*</i>单价<span v-if="purchaseManList.content[currentSayPriceIndex].currency" v-text="purchaseManList.content[currentSayPriceIndex].currency == 'USD' ? '($)' : '(¥)'"></span>:</span>
-              <!--{{purchaseManList.content[currentSayPriceIndex].currency == 'USD' ? '$' : '¥'}})-->
-              <select v-if="!purchaseManList.content[currentSayPriceIndex].currency" v-model="sayPriceObj.currency">
-                <option value="RMB">¥</option>
-                <option value="USD">$</option>
-              </select>
-              <input type="number" class="form-control" @input="onReplyPriceInput(index)" @blur="onReplyPriceBlur(index)" placeholder="单价" v-model="reply.price">
-              <i class="fa fa-minus-circle" v-if="sayPriceObj.replies.length > 1" @click="setReplies('sub', index)"></i>
-              <i class="fa fa-plus-circle" v-if="sayPriceObj.replies.length < 5" @click="setReplies('add', index)"></i>
-            </div>
-          </div>
-        </div>
-        <div class="operate">
-          <span @click="commitSayPrice">确定</span>
-          <span @click="cancelSayPrice">取消</span>
-        </div>
-      </div>
-    </div>
-    <loading v-show="showLoading"></loading>
-  </div>
-</template>
-<script>
-  import Loading from '~components/common/loading/PageLoading.vue'
-  export default {
-    props: {
-      purchase: Object,
-      current: Number
-    },
-    data () {
-      return {
-        sayPriceObj: {
-          currency: 'RMB',
-          leadtime: '',
-          replies: [
-            {
-              lapQty: '',
-              price: ''
-            }
-          ]
-        },
-        validSayPrice: {
-          leadtime: false,
-          repliesPrice: false,
-          repliesLapQty: false
-        },
-        showLoading: false
-      }
-    },
-    components: {
-      Loading
-    },
-    computed: {
-      purchaseManList () {
-        return this.purchase || []
-      },
-      currentSayPriceIndex () {
-        this.resetSayPrice()
-        return this.current
-      },
-      user () {
-        return this.$store.state.option.user
-      }
-    },
-    methods: {
-      setIndex: function (index) {
-        this.$emit('sayPriceIndexAction', index)
-      },
-      sayPrice: function (purchaseMan, index) {
-        if (this.user.logged) {
-          if (this.user.data.enterprise.uu) {
-            if (this.user.data.enterprise.isVendor && this.user.data.enterprise.isVendor !== '1690') {
-              this.resetSayPrice()
-              purchaseMan.active = true
-              this.setIndex(index)
-            } else {
-              this.$message.error('抱歉,您需开通卖家功能才可报价')
-            }
-          } else {
-            this.$message.error('个人账户暂不可报价')
-          }
-        } else {
-          this.$router.push('/auth/login?returnUrl=' + window.location.href)
-        }
-      },
-      cancelSayPrice: function () {
-        this.$emit('cancelSayPriceAction')
-      },
-      commitSayPrice: function () {
-        if (this.checkValid()) {
-          let purchaseMan = this.purchaseManList.content[this.currentSayPriceIndex]
-          this.showLoading = true
-          purchaseMan.leadtime = this.sayPriceObj.leadtime
-          purchaseMan.replies = this.sayPriceObj.replies
-          purchaseMan.vendUU = this.user.data.enterprise.uu
-          purchaseMan.vendUserUU = this.user.data.userUU
-          purchaseMan.qutoApp = 'MALL'
-          if (!purchaseMan.currency) {
-            purchaseMan.currency = this.sayPriceObj.currency
-          }
-          this.$http.post('/inquiry/sale/item/save', purchaseMan).then(response => {
-            this.showLoading = false
-            if (response.data.success === false) {
-              this.$message.error(response.data.message)
-            } else {
-              this.$message.success('报价成功')
-              this.resetSayPrice()
-              this.resetList()
-            }
-          }, error => {
-            console.log(error)
-            this.$message.error('请勿重复报价或报价自己的求购')
-            this.showLoading = false
-          })
-        } else {
-          this.$message.error('请输入正确的报价信息')
-        }
-      },
-      resetList: function () {
-        this.$emit('resetListAction')
-      },
-      resetSayPrice: function () {
-        this.sayPriceObj = {
-          currency: 'RMB',
-          leadtime: '',
-          replies: [
-            {
-              lapQty: '',
-              price: ''
-            }
-          ]
-        }
-      },
-      onLeadtimeInput: function () {
-        if (this.sayPriceObj.leadtime.length > 3) {
-          this.sayPriceObj.leadtime = this.sayPriceObj.leadtime.substring(0, 3)
-        }
-      },
-      onLeadtimeBlur: function () {
-        if (!this.sayPriceObj.leadtime || this.sayPriceObj.leadtime < 1 || this.sayPriceObj.leadtime >= 1000 || this.sayPriceObj.leadtime.toString().indexOf('.') !== -1) {
-          this.validSayPrice.leadtime = false
-          this.$message.error('交期请填写1-999之间的正整数')
-        } else {
-          this.validSayPrice.leadtime = true
-        }
-      },
-      onReplyPriceInput: function (index) {
-        let price = this.sayPriceObj.replies[index].price
-        if (price >= 10000) {
-          this.sayPriceObj.replies[index].price = price.substring(0, 4)
-        } else if (price.indexOf('.') > -1) {
-          let arr = price.split('.')
-          if (arr[0].length > 4) {
-            this.sayPriceObj.replies[index].price = Number(arr[0].substring(0, 4) + '.' + arr[1])
-          } else if (arr[1].length > 6) {
-            this.sayPriceObj.replies[index].price = Number(arr[0] + '.' + arr[1].substring(0, 6))
-          }
-        }
-      },
-      onReplyPriceBlur: function (index) {
-        let price = this.sayPriceObj.replies[index].price
-        if (!price) {
-          this.sayPriceObj.replies[index].price = ''
-          this.$message.error('价格不能为空')
-          this.validSayPrice.repliesPrice = false
-        } else if (price <= 0) {
-          this.sayPriceObj.replies[index].price = ''
-          this.$message.error('输入值必须为正整数')
-          this.validSayPrice.repliesPrice = false
-        } else {
-          this.validSayPrice.repliesPrice = true
-        }
-      },
-      onReplyLapQtyBlur: function (index) {
-        let lapQty = Number(this.sayPriceObj.replies[index].lapQty)
-        let limitDownObj = Number(this.getLimitDownQty())
-        if (!lapQty || lapQty < 1) {
-          this.sayPriceObj.replies[index].lapQty = ''
-          this.$message.error('输入值必须为正整数')
-          this.validSayPrice.repliesLapQty = false
-        } else if (limitDownObj.index !== index && limitDownObj.lapQty > lapQty) {
-          this.$message.error('输入值必须大于#该梯度的下限#')
-          this.sayPriceObj.replies[index].lapQty = ''
-          this.validSayPrice.repliesLapQty = false
-        } else if ((index - 1 >= 0 && this.sayPriceObj.replies[index - 1].lapQty && this.sayPriceObj.replies[index - 1].lapQty >= lapQty) || (index + 1 < this.sayPriceObj.replies.length && this.sayPriceObj.replies[index + 1].lapQty && this.sayPriceObj.replies[index + 1].lapQty <= lapQty)) {
-          this.$message.error('输入值会导致梯度重叠,请重新修改')
-          this.sayPriceObj.replies[index].lapQty = ''
-          this.validSayPrice.repliesLapQty = false
-        } else {
-          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, 9)
-        }
-      },
-      getLimitDownQty: function () {
-        for (let i = 0; i < this.sayPriceObj.replies.length; i++) {
-          if (this.sayPriceObj.replies[i].lapQty) {
-            return {
-              lapQty: this.sayPriceObj.replies[i].lapQty,
-              index: i
-            }
-          }
-        }
-        return {index: -1}
-      },
-      checkValid: function () {
-        for (let i = 0; i < this.sayPriceObj.replies.length; i++) {
-          if (!this.sayPriceObj.replies[i].lapQty || !this.sayPriceObj.replies[i].price) {
-            return false
-          }
-        }
-        return this.validSayPrice.leadtime && this.validSayPrice.repliesLapQty && this.validSayPrice.repliesPrice
-      },
-      setReplies: function (type, index) {
-        if (type === 'add' && this.sayPriceObj.replies.length < 5) {
-          if (this.sayPriceObj.replies[index].lapQty && this.sayPriceObj.replies[index].price) {
-            this.sayPriceObj.replies.splice(index + 1, 0, {
-              lapQty: '',
-              price: ''
-            })
-          } else {
-            this.$message.error('请填完整信息')
-          }
-        } else if (type === 'sub' && this.sayPriceObj.replies.length > 1) {
-          this.sayPriceObj.replies.splice(index, 1)
-        }
-      }
-    }
-  }
-</script>
-<style scoped lang="scss">
-  .say-price-box {
-    position: fixed;
-    width: 476px;
-    top: 30%;
-    left: 33%;
-    bottom: 3%;
-    overflow-y: auto;
-    /*-webkit-box-shadow: 0 5px 15px rgba(0,0,0,.5);*/
-    /*-moz-box-shadow: 0 5px 15px rgba(0,0,0,.5);*/
-    /*box-shadow: 0 5px 15px rgba(0,0,0,.5);*/
-    z-index: 1;
-    .title {
-      position: relative;
-      height: 38px;
-      background: #4290f7;
-      line-height: 38px;
-      color: #fff;
-      border: {
-        top-right-radius: 5px;
-        top-left-radius: 5px;
-      }
-      padding-left: 20px;
-      font-weight: bold;
-      /*> div {*/
-        /*display: inline-block;*/
-        /*padding-left: 57px;*/
-        /*width: 47%;*/
-        /*overflow: hidden;*/
-        /*text-overflow: ellipsis;*/
-        /*white-space: nowrap;*/
-      /*}*/
-      i {
-        position: absolute;
-        right: 10px;
-        top: 8px;
-        cursor: pointer;
-      }
-    }
-    .content {
-      padding: 9px 0 0 0;
-      background: #fff;
-      .content-line {
-        padding: 0 0 14px 0;
-        .form-item {
-          display: inline-block;
-          width: 49%;
-          > span {
-            i {
-              color: #fd2637;
-              margin-right: 4px;
-            }
-          }
-          input {
-            border: 1px solid #bfbfbf;
-            border-radius: 2px;
-            height: 28px;
-            padding: 0 8px;
-          }
-          &.form-left {
-            span {
-              display: inline-block;
-              width: 104px;
-              text-align: right;
-            }
-            input {
-              width: 104px;
-              padding: 0 8px;
-            }
-            &.text-line {
-              width: 100%;
-              span {
-                &.text {
-                  width: 300px;
-                  text-align: left;
-                  color: #4290f7;
-                }
-              }
-            }
-          }
-          &.form-upload {
-            text-align: center;
-            label {
-              margin-bottom: 0;
-              cursor: pointer;
-              input {
-                display: none;
-              }
-              span {
-                display: block;
-                width: 94px;
-                height: 23px;
-                line-height: 18px;
-                font-weight: normal;
-                color: #4290f7;
-                text-align: center;
-                border: 1px dashed #4290f7;
-                border-radius: 11px;
-                i {
-                  font-weight: bold;
-                  font-style: normal;
-                  font-size: 18px;
-                  margin-right: 5px;
-                }
-              }
-            }
-            div {
-              i {
-                cursor: pointer;
-                color: #eb222c;
-                font-size: 16px;
-                margin-right: 10px;
-              }
-              span {
-                display: inline-block;
-                max-width: 128px;
-                overflow: hidden;
-                text-overflow: ellipsis;
-                white-space: nowrap;
-              }
-            }
-          }
-          &.form-right {
-            position: relative;
-            input {
-              width: 104px;
-              padding: 0 8px;
-            }
-            select {
-              position: absolute;
-              top: 0;
-              width: 32px;
-              height: 28px;
-              background: url(/images/applyPurchase/arrow-down.png) no-repeat right center;
-              border: {
-                left: none;
-                top: none;
-                bottom: none;
-                right: 1px solid #bfbfbf;
-                bottom-left-radius: 4px;
-                top-left-radius: 4px;
-              }
-              color: #5392f9;
-              font: small-caption;
-              padding-left: 8px;
-              outline: none;
-              & + input {
-                padding-left: 36px;
-                width: 133px;
-              }
-            }
-            > i {
-              margin-left: 4px;
-            }
-          }
-        }
-      }
-    }
-    .operate {
-      background: #fff;
-      height: 52px;
-      text-align: center;
-      padding-top: 12px;
-      border: {
-        top: 1px solid #e4e5e6;
-        bottom-left-radius: 5px;
-        bottom-right-radius: 5px;
-      }
-      span {
-        display: inline-block;
-        width: 64px;
-        height: 28px;
-        line-height: 28px;
-        text-align: center;
-        background: #4290f7;
-        color: #fff;
-        cursor: pointer;
-        border-radius: 2px;
-        &:last-child {
-          margin-left: 15px;
-          background: #acabab;
-        }
-      }
-    }
-  }
-</style>

+ 2 - 2
components/common/buyOrCar/buyComponent.vue

@@ -21,7 +21,7 @@
         } else {
           if (this.item && !this.disabledFlag) {
             if (isBuy) {
-              this.$http.post('trade/order/buyNow', [{
+              this.$http.post('/trade/order/buyNow', [{
                 uuid: this.item.uuid,
                 batchCode: this.item.batchCode,
                 number: this.item.minBuyQty,
@@ -57,7 +57,7 @@
                   }
                 })
             } else {
-              this.$http.post('trade/cart/add', {
+              this.$http.post('/trade/cart/add', {
                 uuid: this.item.uuid,
                 batchCode: this.item.batchCode,
                 number: this.item.minBuyQty,

+ 2 - 2
components/home/floor/FloorList.vue

@@ -223,7 +223,7 @@
         if (this.user.logged) {
           if (this.user.data.enterprise.uu) {
             if (this.user.data.enterprise.isVendor && this.user.data.enterprise.isVendor !== '1690') {
-              purchaseMan.active = true
+//              purchaseMan.active = true
               this.currentSayPriceIndex = index
             } else {
               this.$message.error('抱歉,您需开通卖家功能才可报价')
@@ -242,7 +242,7 @@
         this.$store.dispatch('applyPurchase/loadPurchaseManList', {pageNumber: this.nowPage, pageSize: this.pageSize, enUU: this.user.data.enterprise ? this.user.data.enterprise.uu : null})
       },
       cancelSayPrice: function () {
-        this.purchaseManList.content[this.currentSayPriceIndex].active = false
+//        this.purchaseManList.content[this.currentSayPriceIndex].active = false
         this.currentSayPriceIndex = -1
       }
     }

+ 7 - 6
components/mobile/applyPurchase/PublishSeek.vue

@@ -22,7 +22,7 @@
             <!--size="mini">-->
           <!--</el-date-picker>-->
         </div>
-        <div class="content-line">
+        <!--<div class="content-line">
           <span>币种:</span>
           <a v-text="applyObj.currency" @click="setShowCurrencyList(!showCurrencyList, $event)"></a>
           <img v-if="!showCurrencyList" src="/images/mobile/@2x/applyPurchase/currency-arrow-down.png" alt="">
@@ -32,15 +32,15 @@
             <li @click="setCurrency('RMB')">RMB</li>
             <li @click="setCurrency('USD')">USD</li>
           </ul>
-        </div>
+        </div>-->
         <div class="content-line">
           <span>数量:</span>
           <input type="text" v-model="applyObj.amount" @blur="checkAmount" @input="onAmountInput">
         </div>
-        <div class="content-line">
+        <!--<div class="content-line">
           <span>生产日期:</span>
           <input type="text" v-model="applyObj.produceDate" @input="onProduceDateChange">
-        </div>
+        </div>-->
         <a @click="goPublish">确认发布</a>
       </div>
     </div>
@@ -167,7 +167,8 @@
           }
           let date = new Date()
           let endDate = formatDate(this.applyObj.deadline, 'yyyy-MM-dd hh:mm:ss')
-          let currency = this.applyObj.currency === '不限' ? null : this.applyObj.currency
+//          let currency = this.applyObj.currency === '不限' ? null : this.applyObj.currency
+          let currency = null
           inquiry.recorderUU = this.user.data.userUU
           inquiry.code = 'MALL' + date.getTime()
           inquiry.date = date
@@ -185,7 +186,7 @@
           inquiryItem.custCurrency = currency
           inquiryItem.cmpCode = (this.applyObj.code).toUpperCase()
           inquiryItem.unitPrice = this.applyObj.unitPrice
-          inquiryItem.produceDate = this.applyObj.produceDate
+          inquiryItem.produceDate = null
           inquiryItem.date = date
           inquiryItem.endDate = endDate
           inquiryItem.encapsulation = this.applyObj.encapsulation

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

@@ -31,10 +31,10 @@
             <span class="fl">价格梯度<span>(PCS)</span></span>
             <span class="fr">
           <!--<span v-text="sayPriceObj.currency" @click="setShowCurrencyList($event)"></span>-->
-          <span v-if="!purchaseDetail.custCurrency" v-text="sayPriceObj.currency" @click="setShowCurrencyList($event)"></span>
-          <span v-if="purchaseDetail.custCurrency" v-text="purchaseDetail.custCurrency"></span>
-          <img v-if="!purchaseDetail.custCurrency && !showCurrencyList" src="/images/mobile/@2x/applyPurchase/currency-arrow-down.png" alt="">
-          <img v-if="!purchaseDetail.custCurrency && showCurrencyList" src="/images/mobile/@2x/applyPurchase/currency-arrow-up.png" alt="">
+          <span v-text="sayPriceObj.currency" @click="setShowCurrencyList($event)"></span>
+          <!--<span v-if="purchaseDetail.custCurrency" v-text="purchaseDetail.custCurrency"></span>-->
+          <img v-if="!showCurrencyList" src="/images/mobile/@2x/applyPurchase/currency-arrow-down.png" alt="">
+          <img v-if="showCurrencyList" src="/images/mobile/@2x/applyPurchase/currency-arrow-up.png" alt="">
           <ul v-if="showCurrencyList">
             <li @click="setCurrency('RMB')">RMB</li>
             <li @click="setCurrency('USD')">USD</li>
@@ -42,8 +42,8 @@
         </span>
           </div>
           <div class="form-item" v-for="(reply, index) in sayPriceObj.replies">
-            <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">
+            <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>
@@ -120,7 +120,7 @@
     },
     computed: {
       purchaseDetail () {
-        return this.$store.state.applyPurchase.purchaseManList.purchaseManDetail.data
+        return JSON.parse(JSON.stringify(this.$store.state.applyPurchase.purchaseManList.purchaseManDetail.data))
       },
       user () {
         return this.$store.state.option.user
@@ -173,7 +173,7 @@
           purchaseMan.vendUU = this.user.data.enterprise.uu
           purchaseMan.vendUserUU = this.user.data.userUU
           purchaseMan.qutoApp = 'MALL'
-          purchaseMan.currency = purchaseMan.custCurrency || this.sayPriceObj.currency
+          purchaseMan.currency = this.sayPriceObj.currency
           this.$http.post('/inquiry/sale/item/save', purchaseMan).then(response => {
             this.showLoading = false
             if (response.data.success === false) {

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

@@ -29,7 +29,7 @@
           </div>
           <div class="base-info">
             <div class="content-line">
-              买家:<span>{{purchaseDetail.inquiry.enterprise ? purchaseDetail.inquiry.enterprise.enName : purchaseDetail.userName}}</span>
+              买家:<span>{{purchaseDetail.inquiry && purchaseDetail.inquiry.enterprise ? purchaseDetail.inquiry.enterprise.enName : purchaseDetail.userName}}</span>
             </div>
             <div class="content-line">
               联系电话:<span>{{purchaseDetail.userTel || '-'}}</span>
@@ -90,7 +90,7 @@
               截止日期:<span>{{purchaseDetail.endDate | date}}</span>
             </div>
             <div class="content-line">
-              买家:<span>{{purchaseDetail.inquiry.enterprise ? purchaseDetail.inquiry.enterprise.enName : purchaseDetail.userName}}</span>
+              买家:<span>{{purchaseDetail.inquiry && purchaseDetail.inquiry.enterprise ? purchaseDetail.inquiry.enterprise.enName : purchaseDetail.userName}}</span>
             </div>
             <div class="content-line">
               联系电话:<span>{{purchaseDetail.userTel || '-'}}</span>

+ 15 - 9
components/mobile/applyPurchase/SeekList.vue

@@ -1,7 +1,7 @@
 <template>
   <div>
     <ul class="seek-list">
-      <li v-for="(item, index) in purchaseManList">
+      <li v-for="(item, index) in purchaseManListData">
         <p>
           <span v-if="item.inquiry.enterprise && item.inquiry.enterprise.enName">{{[item.inquiry.enterprise.enName, user.logged] | enterpriseFilter}}</span>
           <span v-else>{{[item.userName, user.logged] | userNameFilter}}</span>
@@ -49,7 +49,7 @@
         </div>
       </li>
     </ul>
-    <div class="none-state" v-if="!purchaseManList || !purchaseManList.length && !isDataChange">
+    <div class="none-state" v-if="!purchaseManListData || !purchaseManListData.length && !isDataChange">
       <img src="/images/mobile/@2x/car@2x.png">
       <p v-text="'抱歉,暂无求购信息'"></p>
     </div>
@@ -77,7 +77,8 @@ export default {
       activeIndex: -1,
       remindText: '',
       timeoutCount: 0,
-      agreed: 0
+      agreed: 0,
+      purchaseManListData: []
     }
   },
   props: ['userType', 'seekType', 'purchaseManList', 'isDataChange'],
@@ -114,10 +115,15 @@ export default {
       }
     }
   },
+  watch: {
+    'purchaseManList': {
+      handler () {
+        this.purchaseManListData = JSON.parse(JSON.stringify(this.purchaseManList))
+      },
+      immediate: true
+    }
+  },
   computed: {
-    //      purchaseManList () {
-    //        return this.$store.state.applyPurchase.purchaseManList.purchaseManList.data
-    //      },
     user() {
       return this.$store.state.option.user
     }
@@ -170,15 +176,15 @@ export default {
     },
     onSayPriceCancel: function(flag, quteId) {
       if (flag) {
-        this.purchaseManList[this.activeIndex].quoted = 1
-        this.purchaseManList[this.activeIndex].quteId = quteId
+        this.purchaseManListData[this.activeIndex].quoted = 1
+        this.purchaseManListData[this.activeIndex].quteId = quteId
         this.onRemind('报价成功')
       }
       this.showSayPriceBox = false
     },
     onSayPriceInfoCancel: function(flag) {
       if (flag) {
-        this.purchaseManList[this.activeIndex].agreed = 1
+        this.purchaseManListData[this.activeIndex].agreed = 1
         this.onRemind('采纳成功')
       }
       this.showSayPriceInfoBox = false

+ 1 - 1
components/mobile/brand/BrandCenter.vue

@@ -69,7 +69,7 @@
     },
     computed: {
       brandList () {
-        let brandsList = this.$store.state.product.brand.brandList.data
+        let brandsList = JSON.parse(JSON.stringify(this.$store.state.product.brand.brandList.data))
         if (brandsList) {
           for (let i in brandsList) {
             brandsList[i] = brandsList[i].sort(sortList('nameEn'))

+ 10 - 2
components/mobile/brand/ComponentDetail.vue

@@ -30,7 +30,15 @@
     </div>
     <div class="product-store" v-if="activeType == 'store'">
       <table v-if="searchLists&&searchLists.length > 0">
-        <thead id="product-head" :class="{'active': isScrollOverTab}">
+        <thead id="product-head">
+          <tr>
+            <th style="width: 1.55rem;">商家</th>
+            <th style="width: 1.59rem;">生产日期</th>
+            <th style="width: 2.58rem;">价格梯度</th>
+            <th style="width: 1.77rem;">交期(天)</th>
+          </tr>
+        </thead>
+        <thead class="active" v-show="isScrollOverTab">
           <tr>
             <th style="width: 1.55rem;">商家</th>
             <th style="width: 1.59rem;">生产日期</th>
@@ -238,7 +246,7 @@
         }
         let tbodyObj = document.getElementById('product-body')
         let theadObj = document.getElementById('product-head')
-        this.isScrollOverTab = tbodyObj.getBoundingClientRect().top <= theadObj.getBoundingClientRect().height
+        this.isScrollOverTab = tbodyObj.getBoundingClientRect().top - theadObj.getBoundingClientRect().height - 5 <= theadObj.getBoundingClientRect().height
       },
       getMoreStore: function () {
         if (!this.isSearchingMore) {

+ 16 - 8
components/mobile/store/StoreDetail.vue

@@ -17,13 +17,21 @@
     </div>
     <div class="product-store" v-if="activeType == 'product'">
       <table v-if="commodities.content&&commodities.content.length > 0">
-        <thead id="product-head" :class="{'active': isScrollOverTab}">
-        <tr>
-          <th style="width: 1.77rem;">型号/品牌</th>
-          <th style="width: 1.75rem;">包装</th>
-          <th style="width: 2.2rem;">价格梯度</th>
-          <th style="width: 1.77rem;">交期(天)</th>
-        </tr>
+        <thead id="product-head" >
+          <tr>
+            <th style="width: 1.77rem;">型号/品牌</th>
+            <th style="width: 1.75rem;">包装</th>
+            <th style="width: 2.2rem;">价格梯度</th>
+            <th style="width: 1.77rem;">交期(天)</th>
+          </tr>
+        </thead>
+        <thead class="active" v-show="isScrollOverTab">
+          <tr>
+            <th style="width: 1.77rem;">型号/品牌</th>
+            <th style="width: 1.75rem;">包装</th>
+            <th style="width: 2.2rem;">价格梯度</th>
+            <th style="width: 1.77rem;">交期(天)</th>
+          </tr>
         </thead>
         <tbody id="product-body">
         <tr v-for="commodity in searchLists" @click="goProductDetail(commodity.uuid)">
@@ -156,7 +164,7 @@
         }
         let tbodyObj = document.getElementById('product-body')
         let theadObj = document.getElementById('product-head')
-        this.isScrollOverTab = tbodyObj.getBoundingClientRect().top <= theadObj.getBoundingClientRect().height
+        this.isScrollOverTab = tbodyObj.getBoundingClientRect().top - theadObj.getBoundingClientRect().height - 5 <= theadObj.getBoundingClientRect().height
       },
       getMoreCom: function () {
         if (!this.isSearchingMore) {

+ 2 - 2
components/store/CommodityInfo.vue

@@ -370,7 +370,7 @@
         } else {
           if (item) {
             if (isBuy) {
-              this.$http.post('trade/order/buyNow', [{
+              this.$http.post('/trade/order/buyNow', [{
                 uuid: item.uuid,
                 batchCode: item.batchCode,
                 number: this.fragment.num,
@@ -407,7 +407,7 @@
                 })
             } else {
               // this.$store.dispatch('user/addCar', {uuid: item.uuid, batchCode: item.batchCode, number: item.minBuyQty})
-              this.$http.post('trade/cart/add', {
+              this.$http.post('/trade/cart/add', {
                 uuid: item.uuid,
                 batchCode: item.batchCode,
                 number: this.fragment.num,

+ 2 - 2
components/store/RecommendProduct.vue

@@ -88,7 +88,7 @@
         } else {
           if (item) {
             if (isBuy) {
-              this.$http.post('trade/order/buyNow', [{
+              this.$http.post('/trade/order/buyNow', [{
                 uuid: item.comUuid,
                 batchCode: item.batchCode,
                 number: item.minBuyQty,
@@ -125,7 +125,7 @@
                 })
             } else {
               // this.$store.dispatch('user/addCar', {uuid: item.uuid, batchCode: item.batchCode, number: item.minBuyQty})
-              this.$http.post('trade/cart/add', {
+              this.$http.post('/trade/cart/add', {
                 uuid: item.comUuid,
                 batchCode: item.batchCode,
                 number: item.minBuyQty,

+ 8 - 8
components/store/common/StoreHeader.vue

@@ -48,17 +48,17 @@
                 <li v-if="storeInfo.enterprise.enFax">
                   <span class="public">传真:</span><span v-text="storeInfo.enterprise.enFax"></span>
                 </li>
-                <li v-if="storeInfo.enterprise.address || storeInfo.enterprise.enAddress">
-                  <span class="public">地址:</span><span v-text="storeInfo.enterprise.address || storeInfo.enterprise.enAddress"></span>
+                <li v-if="storeInfo.enterprise.address">
+                  <span class="public">地址:</span><span v-text="storeInfo.enterprise.address"></span>
                 </li>
-                <li v-if="storeInfo.enterprise.enPhone || storeInfo.enterprise.enPhone">
-                  <span class="public">手机:</span><span v-text="storeInfo.enterprise.enPhone || storeInfo.enterprise.enPhone"></span>
+                <li v-if="storeInfo.enterprise.enPhone">
+                  <span class="public">手机:</span><span v-text="storeInfo.enterprise.enPhone"></span>
                 </li>
-                <li v-if="storeInfo.enterprise.enWeixin || storeInfo.enterprise.enWeixin">
-                  <span class="public">微信:</span><span v-text="storeInfo.enterprise.enWeixin || storeInfo.enterprise.enWeixin"></span>
+                <li v-if="storeInfo.enterprise.enWeixin">
+                  <span class="public">微信:</span><span v-text="storeInfo.enterprise.enWeixin"></span>
                 </li>
-                <li v-if="storeInfo.enterprise.enQQ || storeInfo.enterprise.enQQ">
-                  <span class="public">Q&nbsp;Q:</span><span v-text="storeInfo.enterprise.enQQ || storeInfo.enterprise.enQQ"></span>
+                <li v-if="storeInfo.enterprise.enQQ">
+                  <span class="public">Q&nbsp;Q:</span><span v-text="storeInfo.enterprise.enQQ"></span>
                 </li>
                 <li class="text-right">
                   <nuxt-link :to="{ name: 'store-uuid-description', params: { uuid: storeInfo.uuid } }">了解更多&gt;</nuxt-link>

+ 1 - 1
pages/mobile/shop/index.vue

@@ -78,7 +78,7 @@
     },
     computed: {
       list () {
-        let list = this.$store.state.provider.stores.storeList.data
+        let list = JSON.parse(JSON.stringify(this.$store.state.provider.stores.storeList.data))
         if (this.isChange) {
           this.searchLists = []
           this.page = 1

+ 25 - 15
pages/mobile/user/index.vue

@@ -8,7 +8,8 @@
         <ul class="en-list" v-show="showEnterpriseToggle">
           <li class="menu-item"
               v-for="en in sortEnterprises"
-              v-if="en.uu != enterpriseInfo.uu">
+              v-if="en.uu != enterpriseInfo.uu"
+              v-bind:key="en.uu">
             <a @click="switchEnterprise(en)">{{ en.enName }}</a>
           </li>
           <li class="menu-item"  v-if="enterpriseInfo.uu">
@@ -43,7 +44,7 @@
       </div>
       <seek-list :userType="userType" :seekType="seekType" :purchaseManList="purchaseManListData" :isDataChange="isDataChange"></seek-list>
     </div>
-    <div class="shop-list" v-bind:key="item" v-if="activeType == 'store'" v-for="item in focusPage.content" @click="goStoreDetail(item.storeInfo.uuid)">
+    <div class="shop-list" v-bind:key="item.id" v-if="activeType == 'store'" v-for="item in focusPage.content" @click="goStoreDetail(item.storeInfo.uuid)">
       <h3>{{item.storeName}}</h3>
       <div class="list-item">
         <div class="item-img">
@@ -239,6 +240,7 @@
         this.seekType = 'wait'
         this.seekKeyword = ''
         this.$router.push('/mobile/user' + (this.userType === 'saler' ? '?type=buyer' : '?type=saler'))
+        this.reloadData()
       },
       searchSeek: function () {
         this.isChange = true
@@ -298,24 +300,32 @@
         return this.$store.state.option.user
       },
       enterpriseInfo () {
-        let ens = this.userInfo.data.enterprises
-        if (ens && ens.length) {
-          for (let i = 0; i < ens.length; i++) {
-            if (ens[i].current) {
-              return ens[i]
+        if (this.userInfo.data.enterprises) {
+          let ens = this.userInfo.data.enterprises.slice()
+          if (ens && ens.length) {
+            for (let i = 0; i < ens.length; i++) {
+              if (ens[i].current) {
+                return ens[i]
+              }
             }
           }
+          return {enName: this.userInfo.data.userName + '(个人账户)'}
+        } else {
+          return ''
         }
-        return {enName: this.userInfo.data.userName + '(个人账户)'}
       },
       sortEnterprises () {
-        let ens = this.userInfo.data.enterprises
-        if (ens && ens.length) {
-          ens.sort(function (a, b) {
-            return b.lastLoginTime - a.lastLoginTime
-          })
+        if (this.user.data.enterprises) {
+          let ens = this.user.data.enterprises.slice()
+          if (ens && ens.length) {
+            ens.sort(function (a, b) {
+              return b.lastLoginTime - a.lastLoginTime
+            })
+          }
+          return ens
+        } else {
+          return ''
         }
-        return ens
       },
       isVendor () {
         return this.enterpriseInfo.isVendor === 313
@@ -330,7 +340,7 @@
         return this.$store.state.applyPurchase.purchaseManList.purchaseManList
       },
       purchaseManList () {
-        let list = this.purchase.data.content
+        let list = this.purchase.data.content.slice()
         if (this.isChange) {
           this.purchaseManListData = []
           this.seekPage = 1

+ 1 - 1
store/help/help.js

@@ -4,7 +4,7 @@ export const actions = {
   // 获取帮助中心信息
   loadHelpSnapsho ({ commit }, params = {}) {
     commit('help/option/REQUEST_SNAPSHO')
-    return axios.get('api/help-service/helps', {params})
+    return axios.get('/api/help-service/helps', {params})
       .then(response => {
         commit('help/option/GET_SNAPSHO_SUCCESS', response.data)
       }, err => {

+ 2 - 2
store/product.js

@@ -3,7 +3,7 @@ import axios from '~/plugins/axios'
 // 保存一列收藏记录, 此方法仅限于在登陆界面使用
 function saveStores ({ commit }, params = {}) {
   commit('common/REQUEST_COLLECTLIST')
-  return axios.get(`trade/collection/list`, { params })
+  return axios.get(`/trade/collection/list`, { params })
     .then(response => {
       commit('common/GET_COLLECTLIST_SUCCESS', response.data)
     }, err => {
@@ -128,7 +128,7 @@ export const actions = {
   // 保存一列收藏记录, 此方法仅限于在登陆界面使用
   saveStores ({ commit }, params = {}) {
     commit('common/REQUEST_COLLECTLIST')
-    return axios.get(`trade/collection/list`, { params })
+    return axios.get(`/trade/collection/list`, { params })
       .then(response => {
         commit('common/GET_COLLECTLIST_SUCCESS', response.data)
       }, err => {