Sfoglia il codice sorgente

创建供应商模块,对接数据接口

Administrator 7 anni fa
parent
commit
ef7349cf9f

+ 1 - 0
components/supplier/details.vue

@@ -145,6 +145,7 @@
         return this.$store.state.supplier.detail.detail.data
       },
       cmpInfo () {
+        console.log(this.$store.state.supplier.detail.cmpInfo.data)
         return this.$store.state.supplier.detail.cmpInfo.data
       },
       user () {

+ 9 - 9
components/supplier/merchant.vue

@@ -9,7 +9,7 @@
       <div class="search">
         <div class="input-group">
           <input type="search" class="form-control" title="code" placeholder="名称/地址/行业/型号/品牌"
-                 v-model="searchCode" @search="goodsSearch(searchCode)"/>
+                 v-model="searchCode" @keyup.13="goodsSearch(searchCode)" @search="goodsSearch(searchCode)"/>
           <span class="input-group-btn">
             <button type="button" class="btn" @click="goodsSearch(searchCode)">&nbsp;查 询</button>
           </span>
@@ -100,18 +100,18 @@
         }
       },
       jumpResource (id, type) {
-        if (!this.hasJump && type === 1) {
+        if (!this.hasJump) {
+          console.log('12')
           if (type === 1) {
             this.$router.push('supplier/' + id)
           } else {
+            console.log('12333')
             this.hasDialog = true
           }
         }
       },
       goodsSearch (type) {
-        if (type) {
-          this.$store.dispatch('supplier/loadVendorList', {page: this.pageParams.page, size: this.pageParams.count, keyword: type})
-        }
+        this.$store.dispatch('supplier/loadVendorList', {page: this.pageParams.page, size: this.pageParams.count, keyword: type})
       },
       handleCurrentChange (type) {
         this.pageParams.page = type
@@ -300,13 +300,13 @@
         }
         .popups{
           position:absolute;
-          top:0;
+          top:50px;
           left:0;
           background: #6c6c6c;
           width:267px;
-          min-height:110px;
+          min-height:20px;
           padding:25px 15px 15px 10px;
-          transition: all .3s ease;
+          transition: all .5s ease;
           opacity: 0;
           color:#fff;
           overflow: hidden;
@@ -331,7 +331,7 @@
               width:155px;
             }
             &:nth-child(4){
-              max-height:38px;
+              max-height:40px;
               overflow: auto;
               white-space:pre-wrap;
               word-wrap:break-word;

+ 9 - 10
components/supplier/resource.vue

@@ -16,7 +16,7 @@
       <div class="user_title">
         <div class="user_name">
           <span>{{enUser.enName}}&nbsp;&nbsp;<i class="fa fa-angle-down"></i></span>
-          <a :href="/store/+ storeInfo.uuid" target="_blank">进入店铺</a>
+          <a :href="/store/+ storeInfo.uuid" target="_blank" v-if="storeInfo.uuid">进入店铺</a>
         </div>
         <div class="user_mes">
           <div class="mes-list">
@@ -35,7 +35,7 @@
       <div class="search">
         <div class="input-group">
           <input type="search" class="form-control" placeholder="请输入要查找的内容"
-                 v-model="searchCode" @search="goodsSearch(searchCode)"/>
+                 v-model="searchCode" @keyup.13="goodsSearch(searchCode)" @search="goodsSearch(searchCode)"/>
           <span class="input-group-btn">
             <button type="button" class="btn" id="search_btn" @click="goodsSearch(searchCode)">
               搜索 <i class="fa fa-search"></i>
@@ -234,14 +234,12 @@
       },
       // 根据搜索信息获取数据
       goodsSearch (type) {
-        if (type) {
-          this.$store.dispatch('supplier/loadMaterialList', {
-            page: 1,
-            size: 20,
-            vendUU: this.$route.params.uuid,
-            keyword: type
-          })
-        }
+        this.$store.dispatch('supplier/loadMaterialList', {
+          page: 1,
+          size: 20,
+          vendUU: this.$route.params.uuid,
+          keyword: type
+        })
       },
       // 弹出询价界面
       immediatelyClick (type) {
@@ -487,6 +485,7 @@
     }
   }
   .user_info{
+    margin-bottom:5px;
     .user_title{
       display:inline-block;
       position:relative;