|
|
@@ -0,0 +1,105 @@
|
|
|
+<template>
|
|
|
+ <div class="seek">
|
|
|
+ <div class="com-mobile-header">
|
|
|
+ <a @click="goLastPage"><i class="iconfont icon-fanhui"></i></a>
|
|
|
+ <p>待报价</p>
|
|
|
+ </div>
|
|
|
+ <div class="mobile-content">
|
|
|
+ <div class="search-content">
|
|
|
+ <input type="text" v-model="seekKeyword" placeholder="型号/品牌/类目/规格/公司" @keyup.13="onSearch">
|
|
|
+ <span @click="onSearch"><i class="iconfont icon-sousuo"></i></span>
|
|
|
+ </div>
|
|
|
+ <seek-list v-show="purchaseManListData.length" :userType="userType" :seekType="seekType" :purchaseManList="purchaseManListData" :isDataChange="isDataChange"></seek-list>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+<script>
|
|
|
+ import { SeekList } from '~components/mobile/applyPurchase'
|
|
|
+ export default {
|
|
|
+ layout: 'mobileNoHeader',
|
|
|
+ middleware: 'authenticated',
|
|
|
+ data () {
|
|
|
+ return {
|
|
|
+ seekKeyword: '',
|
|
|
+ purchaseManListData: [],
|
|
|
+ userType: 'saler',
|
|
|
+ isDataChange: false,
|
|
|
+ page: 1,
|
|
|
+ count: 10,
|
|
|
+ isChange: false
|
|
|
+ }
|
|
|
+ },
|
|
|
+ fetch ({ store }) {
|
|
|
+ let user = store.state.option.user.data
|
|
|
+ let params = {
|
|
|
+ pageNumber: 1,
|
|
|
+ pageSize: 10,
|
|
|
+ state: 'todo'
|
|
|
+ }
|
|
|
+ if (user.enterprise.uu) {
|
|
|
+ params.enUU = user.enterprise.uu
|
|
|
+ } else {
|
|
|
+ params.userUU = user.userUU
|
|
|
+ }
|
|
|
+ return Promise.all([
|
|
|
+ store.dispatch('applyPurchase/loadBuyerUnSayPricePurchaseManList', params)
|
|
|
+ ])
|
|
|
+ },
|
|
|
+ components: {
|
|
|
+ SeekList
|
|
|
+ },
|
|
|
+ watch: {
|
|
|
+ '$store.state.applyPurchase.purchaseManList.purchaseManList.data': {
|
|
|
+ handler: function (val) {
|
|
|
+ let list = val.content ? val.content.slice() : []
|
|
|
+ if (this.isChange) {
|
|
|
+ this.purchaseManListData = list
|
|
|
+ this.isChange = false
|
|
|
+ } else {
|
|
|
+ this.purchaseManListData = this.purchaseManListData.concat(list)
|
|
|
+ }
|
|
|
+ },
|
|
|
+ immediate: true
|
|
|
+ }
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ seekType () {
|
|
|
+ return this.$route.query.seekType
|
|
|
+ }
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ onSearch: function () {
|
|
|
+ this.page = 1
|
|
|
+ this.isChange = true
|
|
|
+ this.reloadData()
|
|
|
+ },
|
|
|
+ reloadData: function () {
|
|
|
+ let params = {
|
|
|
+ pageNumber: this.page,
|
|
|
+ pageSize: this.count,
|
|
|
+ state: 'todo',
|
|
|
+ keyword: this.seekKeyword
|
|
|
+ }
|
|
|
+ if (this.user.data.enterprise.uu) {
|
|
|
+ params.enUU = this.user.data.enterprise.uu
|
|
|
+ } else {
|
|
|
+ params.userUU = this.user.data.userUU
|
|
|
+ }
|
|
|
+ this.$store.dispatch('applyPurchase/loadBuyerUnSayPricePurchaseManList', params)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+</script>
|
|
|
+<style lang="scss" scoped>
|
|
|
+ .search-content {
|
|
|
+ text-align: center;
|
|
|
+ padding: .25rem 0 0 0;
|
|
|
+ input {
|
|
|
+ border: 1px solid #376ff3;
|
|
|
+ }
|
|
|
+ span {
|
|
|
+ height: .46rem;
|
|
|
+ line-height: .46rem;
|
|
|
+ }
|
|
|
+ }
|
|
|
+</style>
|