|
@@ -6,7 +6,7 @@
|
|
|
<p v-text="userInfo.data.userName"></p>
|
|
<p v-text="userInfo.data.userName"></p>
|
|
|
<p v-text="enterpriseInfo.enName"></p>
|
|
<p v-text="enterpriseInfo.enName"></p>
|
|
|
</div>
|
|
</div>
|
|
|
- <a>切换至卖家中心</a>
|
|
|
|
|
|
|
+ <a v-if="isVendor" v-text="userType === 'saler' ? '切换至买家中心' : '切换至卖家中心'" @click="switchType"></a>
|
|
|
</div>
|
|
</div>
|
|
|
<ul class="switch-list">
|
|
<ul class="switch-list">
|
|
|
<li :class="{active: activeType == 'seek'}" @click="activeType = 'seek'">我的求购</li>
|
|
<li :class="{active: activeType == 'seek'}" @click="activeType = 'seek'">我的求购</li>
|
|
@@ -20,12 +20,12 @@
|
|
|
<li :class="{active: seekType == 'accept'}" @click="switchSeek('accept')"><div>已采纳</div></li>
|
|
<li :class="{active: seekType == 'accept'}" @click="switchSeek('accept')"><div>已采纳</div></li>
|
|
|
</ul>
|
|
</ul>
|
|
|
<div class="search-content">
|
|
<div class="search-content">
|
|
|
- <input type="text" placeholder="请输入您要查找的型号或品牌">
|
|
|
|
|
- <span>
|
|
|
|
|
|
|
+ <input type="text" placeholder="请输入您要查找的型号或品牌" v-model="seekKeyword">
|
|
|
|
|
+ <span @click="searchSeek">
|
|
|
<i class="iconfont icon-sousuo"></i>
|
|
<i class="iconfont icon-sousuo"></i>
|
|
|
</span>
|
|
</span>
|
|
|
</div>
|
|
</div>
|
|
|
- <seek-list></seek-list>
|
|
|
|
|
|
|
+ <seek-list :userType="userType" :seekType="seekType" :purchaseManList="purchaseManList"></seek-list>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="shop-list" v-if="activeType == 'store'" v-for="item in focusPage.content" @click="goStoreDetail(item.storeInfo.uuid)">
|
|
<div class="shop-list" v-if="activeType == 'store'" v-for="item in focusPage.content" @click="goStoreDetail(item.storeInfo.uuid)">
|
|
|
<h3>{{item.storeName}}</h3>
|
|
<h3>{{item.storeName}}</h3>
|
|
@@ -52,7 +52,7 @@
|
|
|
</div>
|
|
</div>
|
|
|
</a>
|
|
</a>
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="none-state" v-if="(collectSave.totalElements == 0 && activeType == 'comp') || (focusPage.totalElements == 0 && activeType == 'store') || (collectSave.totalElements == 0 && focusPage.totalElements == 0)">
|
|
|
|
|
|
|
+ <div class="none-state" v-if="(activeType != 'seek') && ((collectSave.totalElements == 0 && activeType == 'comp') || (focusPage.totalElements == 0 && activeType == 'store') || (collectSave.totalElements == 0 && focusPage.totalElements == 0))">
|
|
|
<img src="/images/mobile/@2x/empty-collect.png">
|
|
<img src="/images/mobile/@2x/empty-collect.png">
|
|
|
<p v-text="getRemindText()"></p>
|
|
<p v-text="getRemindText()"></p>
|
|
|
<nuxt-link to="/">返回首页</nuxt-link>
|
|
<nuxt-link to="/">返回首页</nuxt-link>
|
|
@@ -69,12 +69,15 @@
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
+ <page-loading v-show="showLoading"></page-loading>
|
|
|
|
|
+ <div v-if="purchaseManListFetching && false"></div>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
- import RemindBox from '~components/mobile/common/RemindBox.vue'
|
|
|
|
|
import SeekList from '~components/mobile/applyPurchase/SeekList.vue'
|
|
import SeekList from '~components/mobile/applyPurchase/SeekList.vue'
|
|
|
|
|
+ import {RemindBox} from '~components/mobile/common'
|
|
|
|
|
+ import PageLoading from '~components/common/loading/PageLoading.vue'
|
|
|
export default {
|
|
export default {
|
|
|
layout: 'mobile',
|
|
layout: 'mobile',
|
|
|
data () {
|
|
data () {
|
|
@@ -88,18 +91,21 @@
|
|
|
timeoutCount: 0,
|
|
timeoutCount: 0,
|
|
|
showStoreInfo: false,
|
|
showStoreInfo: false,
|
|
|
storeInfo: {},
|
|
storeInfo: {},
|
|
|
- seekType: 'wait'
|
|
|
|
|
|
|
+ seekType: 'wait',
|
|
|
|
|
+ showLoading: false,
|
|
|
|
|
+ seekKeyword: ''
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
components: {
|
|
components: {
|
|
|
RemindBox,
|
|
RemindBox,
|
|
|
- SeekList
|
|
|
|
|
|
|
+ SeekList,
|
|
|
|
|
+ PageLoading
|
|
|
},
|
|
},
|
|
|
- fetch ({ store }) {
|
|
|
|
|
|
|
+ fetch ({ store, route }) {
|
|
|
return Promise.all([
|
|
return Promise.all([
|
|
|
store.dispatch('product/saveStores', { count: 100, page: 1, type: 'component' }),
|
|
store.dispatch('product/saveStores', { count: 100, page: 1, type: 'component' }),
|
|
|
store.dispatch('shop/StoreFocusPage', { count: 100, page: 1 }),
|
|
store.dispatch('shop/StoreFocusPage', { count: 100, page: 1 }),
|
|
|
- store.dispatch('applyPurchase/loadBuyerPurchaseManList', {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/loadBuyerPurchaseManList', {pageNumber: 1, pageSize: 10, enUU: store.state.option.user.data.enterprise ? store.state.option.user.data.enterprise.uu : store.state.option.user.data.userUU})
|
|
|
])
|
|
])
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
@@ -156,12 +162,46 @@
|
|
|
},
|
|
},
|
|
|
switchSeek: function (type) {
|
|
switchSeek: function (type) {
|
|
|
this.seekType = type
|
|
this.seekType = type
|
|
|
- if (type === 'wait') {
|
|
|
|
|
- this.$store.dispatch('applyPurchase/loadBuyerPurchaseManList', {pageNumber: 1, pageSize: 10, enUU: this.$store.state.option.user.data.enterprise ? this.$store.state.option.user.data.enterprise.uu : null})
|
|
|
|
|
- } else if (type === 'done') {
|
|
|
|
|
- this.$store.dispatch('applyPurchase/loadBuyerPurchaseManList', {pageNumber: 1, pageSize: 10, enUU: this.$store.state.option.user.data.enterprise ? this.$store.state.option.user.data.enterprise.uu : null, _state: 'done'})
|
|
|
|
|
|
|
+ this.showLoading = true
|
|
|
|
|
+ if (this.userType !== 'saler') {
|
|
|
|
|
+ if (type === 'wait') {
|
|
|
|
|
+ this.$store.dispatch('applyPurchase/loadBuyerPurchaseManList', {pageNumber: 1, pageSize: 10, enUU: this.$store.state.option.user.data.enterprise ? this.$store.state.option.user.data.enterprise.uu : null})
|
|
|
|
|
+ } else if (type === 'done') {
|
|
|
|
|
+ this.$store.dispatch('applyPurchase/loadBuyerPurchaseManList', {pageNumber: 1, pageSize: 10, enUU: this.$store.state.option.user.data.enterprise ? this.$store.state.option.user.data.enterprise.uu : null, _state: 'done'})
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.$store.dispatch('applyPurchase/loadBuyerPurchaseManList', {pageNumber: 1, pageSize: 10, enUU: this.$store.state.option.user.data.enterprise ? this.$store.state.option.user.data.enterprise.uu : null, _state: 'done'})
|
|
|
|
|
+ }
|
|
|
} else {
|
|
} else {
|
|
|
- this.$store.dispatch('applyPurchase/loadBuyerPurchaseManList', {pageNumber: 1, pageSize: 10, enUU: this.$store.state.option.user.data.enterprise ? this.$store.state.option.user.data.enterprise.uu : null, _state: 'done'})
|
|
|
|
|
|
|
+ if (type === 'wait') {
|
|
|
|
|
+ this.$store.dispatch('applyPurchase/loadPurchaseManList', {pageNumber: 1, pageSize: 10, enUU: this.$store.state.option.user.data.enterprise.uu})
|
|
|
|
|
+ } else if (type === 'done') {
|
|
|
|
|
+ this.$store.dispatch('applyPurchase/loadVendorPurchaseManList', {pageNumber: 1, pageSize: 10, _state: 'done', filter: {vendUU: this.$store.state.option.user.data.enterprise.uu, fromDate: null, endDate: null}})
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.$store.dispatch('applyPurchase/loadVendorPurchaseManList', {pageNumber: 1, pageSize: 10, _state: 'done', filter: {vendUU: this.$store.state.option.user.data.enterprise.uu, fromDate: null, endDate: null}})
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ switchType: function () {
|
|
|
|
|
+ this.$router.push('/mobile/user' + (this.userType === 'saler' ? '' : '?type=saler'))
|
|
|
|
|
+ },
|
|
|
|
|
+ searchSeek: function () {
|
|
|
|
|
+ let type = this.seekType
|
|
|
|
|
+ if (this.userType !== 'saler') {
|
|
|
|
|
+ if (type === 'wait') {
|
|
|
|
|
+ this.$store.dispatch('applyPurchase/loadBuyerPurchaseManList', {pageNumber: 1, pageSize: 10, enUU: this.$store.state.option.user.data.enterprise ? this.$store.state.option.user.data.enterprise.uu : null, keyword: this.seekKeyword})
|
|
|
|
|
+ } else if (type === 'done') {
|
|
|
|
|
+ this.$store.dispatch('applyPurchase/loadBuyerPurchaseManList', {pageNumber: 1, pageSize: 10, enUU: this.$store.state.option.user.data.enterprise ? this.$store.state.option.user.data.enterprise.uu : null, _state: 'done', keyword: this.seekKeyword})
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.$store.dispatch('applyPurchase/loadBuyerPurchaseManList', {pageNumber: 1, pageSize: 10, enUU: this.$store.state.option.user.data.enterprise ? this.$store.state.option.user.data.enterprise.uu : null, _state: 'done', keyword: this.seekKeyword})
|
|
|
|
|
+ }
|
|
|
|
|
+ } else {
|
|
|
|
|
+ if (type === 'wait') {
|
|
|
|
|
+ this.$store.dispatch('applyPurchase/loadPurchaseManList', {pageNumber: 1, pageSize: 10, enUU: this.$store.state.option.user.data.enterprise.uu, keyword: this.seekKeyword})
|
|
|
|
|
+ } else if (type === 'done') {
|
|
|
|
|
+ this.$store.dispatch('applyPurchase/loadVendorPurchaseManList', {pageNumber: 1, pageSize: 10, _state: 'done', filter: {vendUU: this.$store.state.option.user.data.enterprise.uu, fromDate: null, endDate: null, keyword: this.seekKeyword}})
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.$store.dispatch('applyPurchase/loadVendorPurchaseManList', {pageNumber: 1, pageSize: 10, _state: 'done', filter: {vendUU: this.$store.state.option.user.data.enterprise.uu, fromDate: null, endDate: null, keyword: this.seekKeyword}})
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
@@ -174,11 +214,6 @@
|
|
|
},
|
|
},
|
|
|
enterpriseInfo () {
|
|
enterpriseInfo () {
|
|
|
let ens = this.userInfo.data.enterprises
|
|
let ens = this.userInfo.data.enterprises
|
|
|
-// if (ens && ens.length) {
|
|
|
|
|
-// return ens.find(item => item.current) || {enName: this.userInfo.data.userName + '(个人账户)'}
|
|
|
|
|
-// } else {
|
|
|
|
|
-// return {enName: this.userInfo.data.userName + '(个人账户)'}
|
|
|
|
|
-// }
|
|
|
|
|
if (ens && ens.length) {
|
|
if (ens && ens.length) {
|
|
|
for (let i = 0; i < ens.length; i++) {
|
|
for (let i = 0; i < ens.length; i++) {
|
|
|
if (ens[i].current) {
|
|
if (ens[i].current) {
|
|
@@ -188,8 +223,21 @@
|
|
|
}
|
|
}
|
|
|
return {enName: this.userInfo.data.userName + '(个人账户)'}
|
|
return {enName: this.userInfo.data.userName + '(个人账户)'}
|
|
|
},
|
|
},
|
|
|
|
|
+ isVendor () {
|
|
|
|
|
+ return this.enterpriseInfo.isVendor === 313
|
|
|
|
|
+ },
|
|
|
|
|
+ userType () {
|
|
|
|
|
+ return this.$route.query.type
|
|
|
|
|
+ },
|
|
|
focusPage () {
|
|
focusPage () {
|
|
|
return this.$store.state.shop.storeInfo.focusPage.data
|
|
return this.$store.state.shop.storeInfo.focusPage.data
|
|
|
|
|
+ },
|
|
|
|
|
+ purchaseManList () {
|
|
|
|
|
+ return this.$store.state.applyPurchase.purchaseManList.purchaseManList.data
|
|
|
|
|
+ },
|
|
|
|
|
+ purchaseManListFetching () {
|
|
|
|
|
+ this.showLoading = false
|
|
|
|
|
+ return this.$store.state.applyPurchase.purchaseManList.purchaseManList.fetching
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -445,6 +493,11 @@
|
|
|
input {
|
|
input {
|
|
|
margin: .25rem 0 0 0;
|
|
margin: .25rem 0 0 0;
|
|
|
}
|
|
}
|
|
|
|
|
+ span {
|
|
|
|
|
+ height: .54rem;
|
|
|
|
|
+ line-height: .54rem;
|
|
|
|
|
+ margin-bottom: 0;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|