yangc %!s(int64=7) %!d(string=hai) anos
pai
achega
7d3eae8110

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

@@ -24,11 +24,11 @@
       <div class="form-title">
         <span class="fl">价格梯度<span>(PCS)</span></span>
         <span class="fr">
-          <span v-text="sayPriceObj.currency" @click="setShowCurrencyList($event)"></span>
-          <!--<span v-if="!purchaseDetail.currency" v-text="sayPriceObj.currency" @click="setShowCurrencyList($event)"></span>-->
-          <!--<span v-if="purchaseDetail.currency" v-text="purchaseDetail.currency"></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="">
+          <!--<span v-text="sayPriceObj.currency" @click="setShowCurrencyList($event)"></span>-->
+          <span v-if="!purchaseDetail.currency" v-text="sayPriceObj.currency" @click="setShowCurrencyList($event)"></span>
+          <span v-if="purchaseDetail.currency" v-text="purchaseDetail.currency"></span>
+          <img v-if="!purchaseDetail.currency && !showCurrencyList" src="/images/mobile/@2x/applyPurchase/currency-arrow-down.png" alt="">
+          <img v-if="!purchaseDetail.currency && 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>

+ 29 - 7
components/mobile/applyPurchase/SeekList.vue

@@ -37,6 +37,10 @@
         </div>
       </li>
     </ul>
+    <div class="none-state" v-if="!purchaseManList || !purchaseManList.length && !isDataChange">
+      <img src="/images/mobile/@2x/car@2x.png">
+      <p v-text="'抱歉,暂无求购信息'"></p>
+    </div>
     <login-box @onLoginBoxClose="showLoginBox = false" v-if="showLoginBox"></login-box>
   </div>
 </template>
@@ -51,15 +55,19 @@
         showLoginBox: false
       }
     },
-    props: ['userType', 'seekType', 'purchaseManList'],
+    props: ['userType', 'seekType', 'purchaseManList', 'isDataChange'],
     filters: {
       date: function (date) {
-        const d = new Date(Number(date))
-        const year = d.getFullYear()
-        const monthTemp = d.getMonth() + 1
-        const month = monthTemp < 10 ? '0' + monthTemp : '' + monthTemp
-        const day = d.getDate() < 10 ? '0' + d.getDate() : '' + d.getDate() + ' '
-        return year + '-' + month + '-' + day
+        if (date) {
+          const d = new Date(Number(date))
+          const year = d.getFullYear()
+          const monthTemp = d.getMonth() + 1
+          const month = monthTemp < 10 ? '0' + monthTemp : '' + monthTemp
+          const day = d.getDate() < 10 ? '0' + d.getDate() : '' + d.getDate() + ' '
+          return year + '-' + month + '-' + day
+        } else {
+          return '-'
+        }
       },
       enterpriseFilter (str) {
         return str && str.length > 4 ? str.substring(0, 2) + '**' + str.substring(str.length - 2, str.length) : str || '-'
@@ -182,5 +190,19 @@
         }
       }
     }
+
+  }
+  .none-state {
+    text-align: center;
+    margin-top: 1.1rem;
+    img {
+      width: 4.08rem;
+      height: 2.62rem;
+    }
+    p {
+      font-size: .32rem;
+      color: #999;
+      margin: 1.19rem 0 0 0;
+    }
   }
 </style>

+ 5 - 2
pages/mobile/applyPurchase/list/index.vue

@@ -13,7 +13,7 @@
       <img src="/images/mobile/@2x/applyPurchase/home/seek-title.png" alt="">
       <span>最新求购信息</span>
     </div>
-    <seek-list :purchaseManList="purchaseManListData"></seek-list>
+    <seek-list :purchaseManList="purchaseManListData" :isDataChange="isDataChange"></seek-list>
     <loading v-show="isSearchSearchingMore"></loading>
     <div v-if="purchaseManList && false"></div>
   </div>
@@ -35,7 +35,8 @@
         purchaseManListData: [],
         showSeekSearch: true,
         seekKeyword: '',
-        isChange: false
+        isChange: false,
+        isDataChange: false
       }
     },
     mounted: function () {
@@ -60,9 +61,11 @@
           this.purchaseManListData = []
           this.seekPage = 1
           this.isChange = false
+          this.isDataChange = true
         } else {
           this.purchaseManListData = this.purchaseManListData.concat(list.content)
           this.isSearchSearchingMore = false
+          this.isDataChange = false
         }
         return this.$store.state.applyPurchase.purchaseManList.purchaseManList.data
       },

+ 10 - 5
pages/mobile/user/index.vue

@@ -9,7 +9,7 @@
       <a v-if="isVendor" v-text="userType === 'saler' ? '切换至买家中心' : '切换至卖家中心'" @click="switchType"></a>
     </div>
     <ul class="switch-list">
-      <li :class="{active: activeType == 'seek'}" @click="activeType = 'seek'">我的求购</li>
+      <li :class="{active: activeType == 'seek'}" @click="activeType = 'seek'" v-text="userType === 'saler' ? '求购询价' : '我的求购'"></li>
       <li :class="{active: activeType == 'comp'}" @click="activeType = 'comp'">器件收藏</li>
       <li :class="{active: activeType == 'store'}" @click="activeType = 'store'">店铺关注</li>
     </ul>
@@ -25,7 +25,7 @@
         <i class="iconfont icon-sousuo"></i>
         </span>
       </div>
-      <seek-list :userType="userType" :seekType="seekType" :purchaseManList="purchaseManListData"></seek-list>
+      <seek-list :userType="userType" :seekType="seekType" :purchaseManList="purchaseManListData" :isDataChange="isDataChange"></seek-list>
     </div>
     <div class="shop-list" v-if="activeType == 'store'" v-for="item in focusPage.content" @click="goStoreDetail(item.storeInfo.uuid)">
       <h3>{{item.storeName}}</h3>
@@ -100,7 +100,8 @@
         isChange: false,
         seekPage: 1,
         seekSize: 10,
-        purchaseManListData: []
+        purchaseManListData: [],
+        isDataChange: false
       }
     },
     components: {
@@ -113,7 +114,7 @@
       return Promise.all([
         store.dispatch('product/saveStores', { count: 100, page: 1, type: 'component' }),
         store.dispatch('shop/StoreFocusPage', { count: 100, page: 1 }),
-        store.dispatch(route.query.type === 'saler' ? 'applyPurchase/loadPurchaseManList' : 'applyPurchase/loadBuyerUnSayPricePurchaseManList', {pageNumber: 1, pageSize: 10, enUU: store.state.option.user.data.enterprise ? store.state.option.user.data.enterprise.uu : store.state.option.user.data.userUU})
+        store.dispatch(route.query.type === 'saler' ? 'applyPurchase/loadPurchaseManList' : 'applyPurchase/loadBuyerUnSayPricePurchaseManList', {pageNumber: 1, pageSize: 10, enUU: store.state.option.user.data.enterprise ? store.state.option.user.data.enterprise.uu : store.state.option.user.data.userUU, state: (!route.query.type || route.query.type === 'buyer') ? 'todo' : null})
       ])
     },
     mounted: function () {
@@ -183,16 +184,18 @@
       },
       switchType: function () {
         this.seekType = 'wait'
+        this.seekKeyword = ''
         this.$router.push('/mobile/user' + (this.userType === 'saler' ? '' : '?type=saler'))
       },
       searchSeek: function () {
+        this.isChange = true
         this.reloadData()
       },
       reloadData: function () {
         let type = this.seekType
         if (this.userType !== 'saler') {
           if (type === 'wait') {
-            this.$store.dispatch('applyPurchase/loadBuyerUnSayPricePurchaseManList', {pageNumber: this.seekPage, pageSize: this.seekSize, enUU: this.$store.state.option.user.data.enterprise ? this.$store.state.option.user.data.enterprise.uu : null, keyword: this.seekKeyword})
+            this.$store.dispatch('applyPurchase/loadBuyerUnSayPricePurchaseManList', {pageNumber: this.seekPage, pageSize: this.seekSize, enUU: this.$store.state.option.user.data.enterprise ? this.$store.state.option.user.data.enterprise.uu : null, keyword: this.seekKeyword, state: 'todo'})
           } else if (type === 'done') {
             this.$store.dispatch('applyPurchase/loadBuyerPurchaseManList', {pageNumber: this.seekPage, pageSize: this.seekSize, enUU: this.$store.state.option.user.data.enterprise ? this.$store.state.option.user.data.enterprise.uu : null, _state: 'done', keyword: this.seekKeyword})
           } else {
@@ -256,9 +259,11 @@
           this.purchaseManListData = []
           this.seekPage = 1
           this.isChange = false
+          this.isDataChange = true
         } else {
           this.purchaseManListData = this.purchaseManListData.concat(list)
           this.isSearchSearchingMore = false
+          this.isDataChange = false
         }
 //        console.log(this.purchaseManListData)
         return this.purchase.data.content