Browse Source

底部导航,报价提示

yangc 8 years ago
parent
commit
70484d3a2d

+ 94 - 0
components/applyPurchase/ApplyFooter.vue

@@ -74,8 +74,79 @@
         </div>
       </div>
     </div>
+    <div class="footer-nav">
+      <div class="nav-wrap">
+        <div @click="openUrl('order')">
+          <img src="/images/applyPurchase/nav-order.png" alt="">
+          <p>订单查询</p>
+        </div>
+        <div @click="openUrl('kind')">
+          <img src="/images/applyPurchase/nav-kind.png" alt="">
+          <p>器件选型</p>
+        </div>
+        <div @click="openUrl('openStore')">
+          <img src="/images/applyPurchase/nav-open.png" alt="">
+          <p>立即入驻</p>
+        </div>
+        <div @click="openUrl('brand')">
+          <img src="/images/applyPurchase/nav-brand.png" alt="">
+          <p>品牌百科</p>
+        </div>
+      </div>
+    </div>
   </div>
 </template>
+<script>
+  export default {
+    computed: {
+      user () {
+        return this.$store.state.option.user
+      }
+    },
+    methods: {
+      login: function () {
+        this.$router.push('/auth/login')
+      },
+      openUrl: function (type) {
+        if (type === 'order') {
+          if (this.user.logged) {
+            this.$http.get('/basic/vendor/transactionInfo').then(response => {
+              if (response.data.isOpenStore) {
+                window.open('/vendor#/order/center')
+              } else {
+                window.open('/user#/order')
+              }
+            }, err => {
+              window.open('/user#/order')
+              console.log(err)
+            })
+          } else {
+            this.login()
+          }
+        } else if (type === 'kind') {
+          window.location.href = '/product/kind/home'
+        } else if (type === 'openStore') {
+          if (this.user.logged) {
+            this.$http.get('/basic/vendor/transactionInfo').then(response => {
+              if (response.data.isOpenStore) {
+                window.location.href = '/vendor#/store/maintain'
+              } else {
+                window.location.href = '/vendor#/store-apply'
+              }
+            }, err => {
+              this.$message.error('该账户未开通卖家中心')
+              console.log(err)
+            })
+          } else {
+            this.login()
+          }
+        } else if (type === 'brand') {
+          window.location.href = '/product/brand/brandList/ABC'
+        }
+      }
+    }
+  }
+</script>
 <style lang="scss" scoped>
   .apply-footer {
     .good-provider {
@@ -168,5 +239,28 @@
         }
       }
     }
+    .footer-nav {
+      background: #f7f7f7;
+      .nav-wrap {
+        height: 133px;
+        text-align: center;
+        padding-top: 27px;
+        width: 1190px;
+        margin: 0 auto;
+        border-bottom: 1px solid rgba(153, 153, 153, .3);
+        div {
+          display: inline-block;
+          margin-right: 230px;
+          cursor: pointer;
+          &:last-child {
+            margin-right: 0;
+          }
+          p {
+            margin: 5px 0 0 0;
+            font-size: 18px;
+          }
+        }
+      }
+    }
   }
 </style>

+ 16 - 4
components/applyPurchase/ApplyInfo.vue

@@ -167,6 +167,14 @@
         for (let i = 0; i < this.purchaseManList.content.length; i++) {
           _this.purchaseManList.content[i].active = false
         }
+        this.sayPriceObj = {
+          currency: 'RMB',
+          unitPrice: '',
+          minDay: '',
+          maxDay: '',
+          produceDate: '',
+          spId: ''
+        }
         purchaseMan.active = true
       },
       cancelSayPrice: function (purchaseMan) {
@@ -179,10 +187,14 @@
             this.sayPriceObj.spId = purchaseMan.id
             this.sayPriceObj.currency = purchaseMan.currency
             this.$http.post('/seek/offer/saveOffer', this.sayPriceObj).then(response => {
-              this.$message.success('报价成功')
-              this.nowPage = 1
-              this.resetSayPrice()
-              this.resetList()
+              if (response.data.success) {
+                this.$message.success('报价成功')
+                this.nowPage = 1
+                this.resetSayPrice()
+                this.resetList()
+              } else {
+                this.$message.error(response.data.message)
+              }
             }, error => {
               console.log(error)
               this.$message.error('系统错误')

BIN
static/images/applyPurchase/nav-brand.png


BIN
static/images/applyPurchase/nav-kind.png


BIN
static/images/applyPurchase/nav-open.png


BIN
static/images/applyPurchase/nav-order.png