Browse Source

Merge remote-tracking branch 'origin/release-20170915' into release-20170915

Administrator 8 years ago
parent
commit
228efccbac

+ 2 - 1
components/mobile/applyPurchase/SeekList.vue

@@ -43,7 +43,8 @@
             <p class="over-deadline" v-else>已截止</p>
             <!--<a v-if="!userType && item.quoted == 1">已报价</a>-->
             <a v-if="!userType && item.remainingTime > 0 && (!item.quoted || item.quoted != 1) && (user.logged && ((item.inquiry && item.inquiry.enterprise && user.data.enterprise && (item.inquiry.enterprise.uu === user.data.enterprise.uu)) || (!user.data.enterprise.uu && item.userUU == user.data.userUU  && !item.inquiry.enterprise)))" class="self-publish" @click="onRemind('此为贵公司的求购')">我要报价</a>
-            <a v-if="!(userType == 'saler' && seekType  && seekType != 'wait') && (item.remainingTime > 0 && (!item.quoted || item.quoted != 1) && !(user.logged && ((item.inquiry && item.inquiry.enterprise && user.data.enterprise && (item.inquiry.enterprise.uu === user.data.enterprise.uu)) || (!user.data.enterprise.uu && item.userUU == user.data.userUU))))" @click="goSayPrice(item.itemId || item.id, index)">我要报价</a>
+            <a v-if="!item.newId && (!(userType == 'saler' && seekType  && seekType != 'wait') && (item.remainingTime > 0 && (!item.quoted || item.quoted != 1) && !(user.logged && ((item.inquiry && item.inquiry.enterprise && user.data.enterprise && (item.inquiry.enterprise.uu === user.data.enterprise.uu)) || (!user.data.enterprise.uu && item.userUU == user.data.userUU)))))" @click="goSayPrice(item.itemId || item.id, index)">我要报价</a>
+            <a v-if="item.newId" class="self-publish" @click="onRemind('您已报价')">我要报价</a>
             <a v-if="((!userType || userType == 'buyer') && (seekType  && seekType != 'wait')) || (userType == 'saler' && seekType  && seekType != 'wait') || item.quoted == 1" @click="goSayPriceInfo(item.quteId || item.id, item.agreed, index)">查看报价</a>
           </div>
         </div>

+ 6 - 1
components/mobile/supplier/List.vue

@@ -9,7 +9,7 @@
         </span>
       </div>
     </div>
-    <ul>
+    <ul v-if="listData && listData.length">
       <li v-for="item in listData" @click="goSupplierDetail(item)">
         <img v-if="item.isStore == 1" class="open" src="/images/mobile/supplier/is-open.png" alt="">
         <span>{{item.enName}}</span>
@@ -17,6 +17,11 @@
         <i class="tag iconfont icon-xiangyou"></i>
       </li>
     </ul>
+    <div class="com-none-state" v-else>
+      <img src="/images/mobile/@2x/search-empty.png">
+      <p>抱歉,暂无搜索结果</p>
+      <nuxt-link to="/">返回首页</nuxt-link>
+    </div>
     <remind-box :title="remindText" :timeoutCount="timeoutCount"></remind-box>
   </div>
 </template>

+ 5 - 1
components/mobile/supplier/SupplierDetail.vue

@@ -46,7 +46,7 @@
         <i class="iconfont icon-sousuo"></i>
         </span>
       </div>
-      <ul>
+      <ul v-if="productListData && productListData.length">
         <li v-for="product in productListData">
           <div class="prop">
             <span class="head">型号/品牌:</span>
@@ -65,6 +65,10 @@
           <a class="seek-btn" @click="publish(product)">立即询价</a>
         </li>
       </ul>
+      <div class="com-none-state" v-else>
+        <img src="/images/mobile/@2x/search-empty.png">
+        <p>抱歉,暂无搜索结果</p>
+      </div>
     </div>
     <publish-supplier-seek :product="currentProduct" :showPublishBox="showPublishBox" @cancelAction="showPublishBox = false" @remindAction="onRemind"></publish-supplier-seek>
     <remind-box :title="remindText" :timeoutCount="timeoutCount"></remind-box>

+ 23 - 6
pages/mobile/user/index.vue

@@ -130,8 +130,8 @@
               <div class="linetext">单位:PCS</div>
             </div>
             <div class="fr" :class="providerType == 'enterprise' && item.batchCount > 0 ? '' : 'addtop'" >
-              <div class="look" v-if="item.batchCount && providerType == 'enterprise'" @click="lookProductitem(item.id, item)" :class="{noadd: item.addProductPerson}">查看产品</div>
-              <div class="add" v-if="providerType == 'enterprise' && !item.addProductPerson" @click="addProtoperson(item)">加入个人产品</div>
+              <div class="look" v-if="item.batchCount && providerType == 'enterprise'" @click="lookProductitem(item.id, item)" >查看产品</div>
+              <div class="add" v-if="providerType == 'enterprise'" @click="addProtoperson(item)" :class="{noadd: item.addProductPerson}">加入个人产品</div>
               <div class="delete" v-if="providerType == 'person'" @click="deleteProvider(item.id, index)">删除</div>
             </div>
           </div>
@@ -554,6 +554,7 @@
           this.GetEnterpriseListData.splice(0, this.GetEnterpriseListData.length)
           this.GetEnterpriseListData = null
           this.GetEnterpriseListData = []
+          this.seekPage = 1
         }
         this.reloadData()
       },
@@ -697,10 +698,20 @@
         this.showDelete = false
       },
       addProtoperson: function(item) {
+        if (item.addProductPerson) {
+          this.collectResult = '已在个人产品库'
+          this.timeoutCount++
+          return false
+        }
         this.$http.post('/trade/products/person', [item.id])
           .then(response => {
             this.collectResult = '绑定成功'
             this.timeoutCount++
+            this.seekPage = 1
+            this.GetEnterpriseListData.splice(0, this.GetEnterpriseListData.length)
+            this.GetEnterpriseListData = null
+            this.GetEnterpriseListData = []
+            this.reloadData()
           }, () => {
             this.collectResult = '绑定失败'
             this.timeoutCount++
@@ -1252,6 +1263,11 @@
           .add {
             background: #0067e7;
             color: #fff;
+            &.noadd{
+              background: #cccbcb;
+              color: #fff;
+              border:1px solid #cccbcb;
+            }
           }
         }
         div {
@@ -1264,10 +1280,6 @@
             background: #0067e7;
             color: #fff;
           }
-          &.noadd {
-            margin-bottom: 0px;
-            margin-top: 0.3rem;
-          }
           &.add{
             background: #fff;
             color: #0067e7;
@@ -1278,6 +1290,11 @@
             color: #f70415;
             border: 1px solid #f70415;
           }
+          &.noadd{
+            background: #cccbcb;
+            color: #fff;
+            border:1px solid #cccbcb;
+          }
         }
         div:nth-child(1){
           margin-bottom: 0.26rem