|
|
@@ -128,10 +128,21 @@
|
|
|
Loading
|
|
|
},
|
|
|
fetch ({ store, route }) {
|
|
|
+ let user = store.state.option.user.data
|
|
|
+ let params = {
|
|
|
+ pageNumber: 1,
|
|
|
+ pageSize: 10,
|
|
|
+ state: (!route.query.type || route.query.type === 'buyer') ? 'todo' : null
|
|
|
+ }
|
|
|
+ if (user.enterprise.uu) {
|
|
|
+ params.enUU = user.enterprise.uu
|
|
|
+ } else {
|
|
|
+ params.userUU = user.userUU
|
|
|
+ }
|
|
|
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, state: (!route.query.type || route.query.type === 'buyer') ? 'todo' : null})
|
|
|
+ store.dispatch(route.query.type === 'saler' ? 'applyPurchase/loadPurchaseManList' : 'applyPurchase/loadBuyerUnSayPricePurchaseManList', params)
|
|
|
])
|
|
|
},
|
|
|
mounted: function () {
|
|
|
@@ -233,13 +244,27 @@
|
|
|
},
|
|
|
reloadData: function () {
|
|
|
let type = this.seekType
|
|
|
+ let user = this.$store.state.option.user.data
|
|
|
+ let params = {
|
|
|
+ pageNumber: 1,
|
|
|
+ pageSize: 10,
|
|
|
+ keyword: this.seekKeyword || null
|
|
|
+ }
|
|
|
+ if (user.enterprise.uu) {
|
|
|
+ params.enUU = user.enterprise.uu
|
|
|
+ } else {
|
|
|
+ params.userUU = user.userUU
|
|
|
+ }
|
|
|
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, state: 'todo'})
|
|
|
+ params._state = 'todo'
|
|
|
+ this.$store.dispatch('applyPurchase/loadBuyerUnSayPricePurchaseManList', params)
|
|
|
} 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})
|
|
|
+ params._state = 'done'
|
|
|
+ this.$store.dispatch('applyPurchase/loadBuyerPurchaseManList', params)
|
|
|
} else {
|
|
|
- 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})
|
|
|
+ params._state = 'done'
|
|
|
+ this.$store.dispatch('applyPurchase/loadBuyerPurchaseManList', params)
|
|
|
}
|
|
|
} else {
|
|
|
if (type === 'wait') {
|