|
|
@@ -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
|