|
@@ -21,20 +21,24 @@
|
|
|
<span class="mobile-switch-btn fours" :class="{'active': activeType==='invalid'}" @click="switchActiveType('invalid')"><b>已失效</b></span>
|
|
<span class="mobile-switch-btn fours" :class="{'active': activeType==='invalid'}" @click="switchActiveType('invalid')"><b>已失效</b></span>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="seek-title com-switch-item" v-if="userType === 'buyer' && seekType === 'seekPurchase'">
|
|
<div class="seek-title com-switch-item" v-if="userType === 'buyer' && seekType === 'seekPurchase'">
|
|
|
- <span class="mobile-switch-btn" :class="{'active': activeType==='todo'}" @click="switchActiveType('todo')"><b>待报价</b></span>
|
|
|
|
|
- <span class="mobile-switch-btn" :class="{'active': activeType==='done'}" @click="switchActiveType('done')"><b>已报价</b></span>
|
|
|
|
|
|
|
+ <span class="mobile-switch-btn" :class="{'active': backType==='seekPurchase'}" @click="switchActiveType( 'seekPurchase')"><b>公共询价</b></span>
|
|
|
|
|
+ <span class="mobile-switch-btn" :class="{'active': backType==='purchaseinquiry'}" @click="switchActiveType('purchaseinquiry')"><b>定向询价</b></span>
|
|
|
|
|
+ <!--<span class="mobile-switch-btn" :class="{'active': activeType==='todo'}" @click="switchActiveType('todo')"><b>待报价</b></span>-->
|
|
|
|
|
+ <!--<span class="mobile-switch-btn" :class="{'active': activeType==='done'}" @click="switchActiveType('done')"><b>已报价</b></span>-->
|
|
|
</div>
|
|
</div>
|
|
|
<div class="seek-title com-switch-item" v-if="userType === 'buyer' && seekType === 'purchaseinquiry'">
|
|
<div class="seek-title com-switch-item" v-if="userType === 'buyer' && seekType === 'purchaseinquiry'">
|
|
|
- <span class="mobile-switch-btn fours" :class="{'active': activeType==='todo'}" @click="switchActiveType('todo')"><b>待报价</b></span>
|
|
|
|
|
- <span class="mobile-switch-btn fours" :class="{'active': activeType==='done'}" @click="switchActiveType('done')"><b>已报价</b></span>
|
|
|
|
|
- <span class="mobile-switch-btn fours" :class="{'active': activeType==='agreed'}" @click="switchActiveType('agreed')"><b>已采纳</b></span>
|
|
|
|
|
- <span class="mobile-switch-btn fours" :class="{'active': activeType==='end'}" @click="switchActiveType('end')"><b>已失效</b></span>
|
|
|
|
|
|
|
+ <span class="mobile-switch-btn" :class="{'active': backType==='seekPurchase'}" @click="switchActiveType( 'seekPurchase')"><b>公共询价</b></span>
|
|
|
|
|
+ <span class="mobile-switch-btn" :class="{'active': backType==='purchaseinquiry'}" @click="switchActiveType('purchaseinquiry')"><b>定向询价</b></span>
|
|
|
|
|
+ <!--<span class="mobile-switch-btn fours" :class="{'active': activeType==='todo'}" @click="switchActiveType('todo')"><b>待报价</b></span>-->
|
|
|
|
|
+ <!--<span class="mobile-switch-btn fours" :class="{'active': activeType==='done'}" @click="switchActiveType('done')"><b>已报价</b></span>-->
|
|
|
|
|
+ <!--<span class="mobile-switch-btn fours" :class="{'active': activeType==='agreed'}" @click="switchActiveType('agreed')"><b>已采纳</b></span>-->
|
|
|
|
|
+ <!--<span class="mobile-switch-btn fours" :class="{'active': activeType==='end'}" @click="switchActiveType('end')"><b>已失效</b></span>-->
|
|
|
</div>
|
|
</div>
|
|
|
<div class="search-content">
|
|
<div class="search-content">
|
|
|
<input type="text" v-model="seekKeyword" :placeholder="userType === 'buyer' ? '品牌/型号' : '品牌/物料名称/型号/规格/公司'" @keyup.13="onSearch">
|
|
<input type="text" v-model="seekKeyword" :placeholder="userType === 'buyer' ? '品牌/型号' : '品牌/物料名称/型号/规格/公司'" @keyup.13="onSearch">
|
|
|
<span @click="onSearch"><i class="iconfont icon-sousuo"></i></span>
|
|
<span @click="onSearch"><i class="iconfont icon-sousuo"></i></span>
|
|
|
</div>
|
|
</div>
|
|
|
- <seek-list :keyword="remindKeyword" :isSearch="isSearch" :userType="userType" :seekType="seekType" :activeType="activeType" :purchaseManList="purchaseManListData"></seek-list>
|
|
|
|
|
|
|
+ <seek-list v-if="showSeeklist" :keyword="remindKeyword" :isSearch="isSearch" :userType="userType" :seekType="backType" :activeType="activeType" :purchaseManList="purchaseManListData"></seek-list>
|
|
|
<pull-up :fixId="'mobileFixContent'" :searchMore="fetching" :allPage="allPage" :page="page" @pullUpAction="onPullUpAction"></pull-up>
|
|
<pull-up :fixId="'mobileFixContent'" :searchMore="fetching" :allPage="allPage" :page="page" @pullUpAction="onPullUpAction"></pull-up>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
@@ -54,7 +58,9 @@
|
|
|
isChange: false,
|
|
isChange: false,
|
|
|
isSearch: false,
|
|
isSearch: false,
|
|
|
remindKeyword: '',
|
|
remindKeyword: '',
|
|
|
- activeType: 'todo'
|
|
|
|
|
|
|
+ activeType: 'todo',
|
|
|
|
|
+ backType: '',
|
|
|
|
|
+ showSeeklist: false
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
props: ['userType'],
|
|
props: ['userType'],
|
|
@@ -67,7 +73,7 @@
|
|
|
'purchase.data': {
|
|
'purchase.data': {
|
|
|
handler: function (val) {
|
|
handler: function (val) {
|
|
|
let list = this.baseUtils.deepCopy(val.content || [])
|
|
let list = this.baseUtils.deepCopy(val.content || [])
|
|
|
- if (this.activeType === 'done' && this.seekType !== 'seekPurchase') {
|
|
|
|
|
|
|
+ if (this.activeType === 'done' && this.backType !== 'seekPurchase') {
|
|
|
list.map(val => {
|
|
list.map(val => {
|
|
|
val.quotations = {
|
|
val.quotations = {
|
|
|
replies: val.replies,
|
|
replies: val.replies,
|
|
@@ -84,6 +90,7 @@
|
|
|
} else {
|
|
} else {
|
|
|
this.purchaseManListData = this.purchaseManListData.concat(list)
|
|
this.purchaseManListData = this.purchaseManListData.concat(list)
|
|
|
}
|
|
}
|
|
|
|
|
+ this.showSeeklist = true
|
|
|
},
|
|
},
|
|
|
immediate: true
|
|
immediate: true
|
|
|
}
|
|
}
|
|
@@ -109,13 +116,22 @@
|
|
|
case 'personage': title = '我的商机'; break
|
|
case 'personage': title = '我的商机'; break
|
|
|
case 'enterprise': title = '公司商机'; break
|
|
case 'enterprise': title = '公司商机'; break
|
|
|
case 'enquiry': title = '定向询价'; break
|
|
case 'enquiry': title = '定向询价'; break
|
|
|
- case 'seekPurchase': title = '公共询价'; break
|
|
|
|
|
- case 'purchaseinquiry': title = '定向询价'; break
|
|
|
|
|
|
|
+ case 'seekPurchase': title = '待报价'; break
|
|
|
|
|
+ case 'purchaseinquiry': title = '已报价'; break
|
|
|
|
|
+ // case 'seekPurchase': title = '公共询价'; break
|
|
|
|
|
+ // case 'purchaseinquiry': title = '定向询价'; break
|
|
|
default: title = '已报价'
|
|
default: title = '已报价'
|
|
|
}
|
|
}
|
|
|
return title
|
|
return title
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
|
|
+ created() {
|
|
|
|
|
+ if (this.userType === 'buyer') {
|
|
|
|
|
+ this.backType = 'seekPurchase'
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.backType = this.seekType
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
mounted () {
|
|
mounted () {
|
|
|
// 获取链接
|
|
// 获取链接
|
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
@@ -132,14 +148,26 @@
|
|
|
},
|
|
},
|
|
|
reloadData: function () {
|
|
reloadData: function () {
|
|
|
// let overdue = this.overdue === 'attention' ? '0' : '1'
|
|
// let overdue = this.overdue === 'attention' ? '0' : '1'
|
|
|
- this.$emit('reloadAction', this.page, this.count, this.seekKeyword, this.seekType, this.activeType)
|
|
|
|
|
|
|
+ if (this.userType === 'buyer') {
|
|
|
|
|
+ let _type = this.seekType === 'seekPurchase' ? 'todo' : 'done'
|
|
|
|
|
+ this.$emit('reloadAction', this.page, this.count, this.seekKeyword, this.backType, _type)
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.$emit('reloadAction', this.page, this.count, this.seekKeyword, this.seekType, this.activeType)
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
onPullUpAction: function () {
|
|
onPullUpAction: function () {
|
|
|
this.page++
|
|
this.page++
|
|
|
this.reloadData()
|
|
this.reloadData()
|
|
|
},
|
|
},
|
|
|
switchActiveType: function (type) {
|
|
switchActiveType: function (type) {
|
|
|
- this.activeType = type
|
|
|
|
|
|
|
+ // 修改买家中心,顶部头部切换功能
|
|
|
|
|
+ if (this.userType === 'buyer') {
|
|
|
|
|
+ this.showSeeklist = false
|
|
|
|
|
+ this.backType = type
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.backType = this.seekType
|
|
|
|
|
+ this.activeType = type
|
|
|
|
|
+ }
|
|
|
this.isSearch = false
|
|
this.isSearch = false
|
|
|
this.remindKeyword = this.seekKeyword = ''
|
|
this.remindKeyword = this.seekKeyword = ''
|
|
|
this.page = 1
|
|
this.page = 1
|
|
@@ -149,6 +177,10 @@
|
|
|
myActiveType: function () {
|
|
myActiveType: function () {
|
|
|
if (this.$store.state.option.messageType) {
|
|
if (this.$store.state.option.messageType) {
|
|
|
this.activeType = 'done'
|
|
this.activeType = 'done'
|
|
|
|
|
+ } else if (this.userType === 'buyer' && this.seekType === 'seekPurchase') {
|
|
|
|
|
+ this.activeType = 'todo'
|
|
|
|
|
+ } else if (this.userType === 'buyer' && this.seekType === 'purchaseinquiry') {
|
|
|
|
|
+ this.activeType = 'done'
|
|
|
} else {
|
|
} else {
|
|
|
this.activeType = 'todo'
|
|
this.activeType = 'todo'
|
|
|
}
|
|
}
|