|
|
@@ -22,12 +22,12 @@
|
|
|
<forward-goods-list v-else></forward-goods-list>
|
|
|
</template>
|
|
|
<template v-if="searchType == 'product'">
|
|
|
- 123
|
|
|
+ <supplier-list></supplier-list>
|
|
|
</template>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
- import { GoodList, ResultTitle, ForwardGoodsList } from '~components/search'
|
|
|
+ import { GoodList, ResultTitle, ForwardGoodsList, SupplierList } from '~components/search'
|
|
|
// import DetailBrand from '~components/search/DetailBrand.vue'
|
|
|
export default{
|
|
|
layout: 'main',
|
|
|
@@ -55,13 +55,14 @@
|
|
|
components: {
|
|
|
ResultTitle,
|
|
|
GoodList,
|
|
|
- ForwardGoodsList
|
|
|
+ ForwardGoodsList,
|
|
|
+ SupplierList
|
|
|
// DetailBrand
|
|
|
},
|
|
|
watch: {
|
|
|
- '$route.query.w': {
|
|
|
+ '$route.query': {
|
|
|
handler: function (val) {
|
|
|
- this.key = val
|
|
|
+ this.key = val.w
|
|
|
this.reloadAll()
|
|
|
},
|
|
|
immediate: false
|
|
|
@@ -90,10 +91,10 @@
|
|
|
this.sorting = {}
|
|
|
this.paramJSON = {}
|
|
|
this.reloadList()
|
|
|
- this.reloadKind()
|
|
|
- this.reloadBrand()
|
|
|
- this.reloadStoreType()
|
|
|
- this.reloadCrname()
|
|
|
+// this.reloadKind()
|
|
|
+// this.reloadBrand()
|
|
|
+// this.reloadStoreType()
|
|
|
+// this.reloadCrname()
|
|
|
},
|
|
|
reloadList: function () {
|
|
|
if (this.sorting === {}) {
|
|
|
@@ -101,26 +102,26 @@
|
|
|
}
|
|
|
this.$store.dispatch('searchData/searchForListNew', {count: this.pageSize, filter: this.filter, keyword: this.$route.query.w, page: this.nowPage, sorting: this.sorting, type: this.searchType})
|
|
|
},
|
|
|
- reloadKind: function () {
|
|
|
- if (!this.filter.goods_kindId) {
|
|
|
- this.$store.dispatch('searchData/searchForKinds', {collectList: 'goods_kind', keyword: this.$route.query.w, paramJSON: this.paramJSON})
|
|
|
- }
|
|
|
- },
|
|
|
- reloadBrand: function () {
|
|
|
- if (!this.filter.goods_brandId) {
|
|
|
- this.$store.dispatch('searchData/searchForBrands', {collectList: 'goods_brand', keyword: this.$route.query.w, paramJSON: this.paramJSON})
|
|
|
- }
|
|
|
- },
|
|
|
- reloadStoreType: function () {
|
|
|
- if (!this.filter.goods_store_type) {
|
|
|
- this.$store.dispatch('searchData/searchForStoreType', {collectList: 'goods_store_type', keyword: this.$route.query.w, paramJSON: this.paramJSON})
|
|
|
- }
|
|
|
- },
|
|
|
- reloadCrname: function () {
|
|
|
- if (!this.filter.goods_crname) {
|
|
|
- this.$store.dispatch('searchData/searchForCrname', {collectList: 'goods_crname', keyword: this.$route.query.w, paramJSON: this.paramJSON})
|
|
|
- }
|
|
|
- },
|
|
|
+// reloadKind: function () {
|
|
|
+// if (!this.filter.goods_kindId) {
|
|
|
+// this.$store.dispatch('searchData/searchForKinds', {collectList: 'goods_kind', keyword: this.$route.query.w, paramJSON: this.paramJSON})
|
|
|
+// }
|
|
|
+// },
|
|
|
+// reloadBrand: function () {
|
|
|
+// if (!this.filter.goods_brandId) {
|
|
|
+// this.$store.dispatch('searchData/searchForBrands', {collectList: 'goods_brand', keyword: this.$route.query.w, paramJSON: this.paramJSON})
|
|
|
+// }
|
|
|
+// },
|
|
|
+// reloadStoreType: function () {
|
|
|
+// if (!this.filter.goods_store_type) {
|
|
|
+// this.$store.dispatch('searchData/searchForStoreType', {collectList: 'goods_store_type', keyword: this.$route.query.w, paramJSON: this.paramJSON})
|
|
|
+// }
|
|
|
+// },
|
|
|
+// reloadCrname: function () {
|
|
|
+// if (!this.filter.goods_crname) {
|
|
|
+// this.$store.dispatch('searchData/searchForCrname', {collectList: 'goods_crname', keyword: this.$route.query.w, paramJSON: this.paramJSON})
|
|
|
+// }
|
|
|
+// },
|
|
|
listenPage: function (nPage) {
|
|
|
this.nowPage = nPage
|
|
|
this.reloadList()
|
|
|
@@ -142,89 +143,89 @@
|
|
|
}
|
|
|
this.reloadList()
|
|
|
},
|
|
|
- listenKindFilter: function (kindarr) {
|
|
|
- this.nowPage = 1
|
|
|
- if (kindarr.length === 0) {
|
|
|
- delete this.filter.goods_kindId
|
|
|
- delete this.paramJSON.goods_kindid
|
|
|
- this.reloadKind()
|
|
|
- this.reloadBrand()
|
|
|
- this.reloadList()
|
|
|
- this.reloadStoreType()
|
|
|
- this.reloadCrname()
|
|
|
- } else {
|
|
|
- this.filter.goods_kindId = kindarr
|
|
|
- this.paramJSON.goods_kindid = kindarr
|
|
|
- this.reloadBrand()
|
|
|
- this.reloadList()
|
|
|
- this.reloadStoreType()
|
|
|
- this.reloadCrname()
|
|
|
- }
|
|
|
- },
|
|
|
- listenBrandFilter: function (brandarr) {
|
|
|
- this.nowPage = 1
|
|
|
- if (brandarr.length === 0) {
|
|
|
- delete this.filter.goods_brandId
|
|
|
- delete this.paramJSON.goods_brandid
|
|
|
- this.reloadKind()
|
|
|
- this.reloadBrand()
|
|
|
- this.reloadList()
|
|
|
- this.reloadStoreType()
|
|
|
- this.reloadCrname()
|
|
|
- } else {
|
|
|
- this.filter.goods_brandId = brandarr
|
|
|
- this.paramJSON.goods_brandid = brandarr
|
|
|
- this.reloadKind()
|
|
|
- this.reloadList()
|
|
|
- this.reloadStoreType()
|
|
|
- this.reloadCrname()
|
|
|
- }
|
|
|
- },
|
|
|
- listenTypeFilter: function (typearr) {
|
|
|
- this.nowPage = 1
|
|
|
- if (typearr.length === 0) {
|
|
|
- delete this.filter.goods_store_type
|
|
|
- delete this.paramJSON.goods_store_type
|
|
|
- this.reloadKind()
|
|
|
- this.reloadBrand()
|
|
|
- this.reloadList()
|
|
|
- this.reloadCrname()
|
|
|
- } else {
|
|
|
- this.filter.goods_store_type = typearr
|
|
|
- this.paramJSON.goods_store_type = typearr
|
|
|
- this.reloadKind()
|
|
|
- this.reloadBrand()
|
|
|
- this.reloadList()
|
|
|
- this.reloadCrname()
|
|
|
- }
|
|
|
- },
|
|
|
- listenCrnameFilter: function (crnamearr) {
|
|
|
- this.nowPage = 1
|
|
|
- if (crnamearr.length === 0) {
|
|
|
- delete this.filter.goods_crname
|
|
|
- delete this.paramJSON.goods_crname
|
|
|
- this.reloadKind()
|
|
|
- this.reloadBrand()
|
|
|
- this.reloadList()
|
|
|
- this.reloadStoreType()
|
|
|
- } else {
|
|
|
- this.filter.goods_crname = crnamearr
|
|
|
- this.paramJSON.goods_crname = crnamearr
|
|
|
- this.reloadKind()
|
|
|
- this.reloadBrand()
|
|
|
- this.reloadList()
|
|
|
- this.reloadStoreType()
|
|
|
- }
|
|
|
- },
|
|
|
- listenCrnameFlag: function (obj) {
|
|
|
- if (obj.rmb_click_flag && obj.usd_click_flag) {
|
|
|
- this.crname_click_flag.rmb_click_flag = false
|
|
|
- this.crname_click_flag.usd_click_flag = false
|
|
|
- } else {
|
|
|
- this.crname_click_flag.rmb_click_flag = obj.rmb_click_flag
|
|
|
- this.crname_click_flag.usd_click_flag = obj.usd_click_flag
|
|
|
- }
|
|
|
- },
|
|
|
+// listenKindFilter: function (kindarr) {
|
|
|
+// this.nowPage = 1
|
|
|
+// if (kindarr.length === 0) {
|
|
|
+// delete this.filter.goods_kindId
|
|
|
+// delete this.paramJSON.goods_kindid
|
|
|
+// this.reloadKind()
|
|
|
+// this.reloadBrand()
|
|
|
+// this.reloadList()
|
|
|
+// this.reloadStoreType()
|
|
|
+// this.reloadCrname()
|
|
|
+// } else {
|
|
|
+// this.filter.goods_kindId = kindarr
|
|
|
+// this.paramJSON.goods_kindid = kindarr
|
|
|
+// this.reloadBrand()
|
|
|
+// this.reloadList()
|
|
|
+// this.reloadStoreType()
|
|
|
+// this.reloadCrname()
|
|
|
+// }
|
|
|
+// },
|
|
|
+// listenBrandFilter: function (brandarr) {
|
|
|
+// this.nowPage = 1
|
|
|
+// if (brandarr.length === 0) {
|
|
|
+// delete this.filter.goods_brandId
|
|
|
+// delete this.paramJSON.goods_brandid
|
|
|
+// this.reloadKind()
|
|
|
+// this.reloadBrand()
|
|
|
+// this.reloadList()
|
|
|
+// this.reloadStoreType()
|
|
|
+// this.reloadCrname()
|
|
|
+// } else {
|
|
|
+// this.filter.goods_brandId = brandarr
|
|
|
+// this.paramJSON.goods_brandid = brandarr
|
|
|
+// this.reloadKind()
|
|
|
+// this.reloadList()
|
|
|
+// this.reloadStoreType()
|
|
|
+// this.reloadCrname()
|
|
|
+// }
|
|
|
+// },
|
|
|
+// listenTypeFilter: function (typearr) {
|
|
|
+// this.nowPage = 1
|
|
|
+// if (typearr.length === 0) {
|
|
|
+// delete this.filter.goods_store_type
|
|
|
+// delete this.paramJSON.goods_store_type
|
|
|
+// this.reloadKind()
|
|
|
+// this.reloadBrand()
|
|
|
+// this.reloadList()
|
|
|
+// this.reloadCrname()
|
|
|
+// } else {
|
|
|
+// this.filter.goods_store_type = typearr
|
|
|
+// this.paramJSON.goods_store_type = typearr
|
|
|
+// this.reloadKind()
|
|
|
+// this.reloadBrand()
|
|
|
+// this.reloadList()
|
|
|
+// this.reloadCrname()
|
|
|
+// }
|
|
|
+// },
|
|
|
+// listenCrnameFilter: function (crnamearr) {
|
|
|
+// this.nowPage = 1
|
|
|
+// if (crnamearr.length === 0) {
|
|
|
+// delete this.filter.goods_crname
|
|
|
+// delete this.paramJSON.goods_crname
|
|
|
+// this.reloadKind()
|
|
|
+// this.reloadBrand()
|
|
|
+// this.reloadList()
|
|
|
+// this.reloadStoreType()
|
|
|
+// } else {
|
|
|
+// this.filter.goods_crname = crnamearr
|
|
|
+// this.paramJSON.goods_crname = crnamearr
|
|
|
+// this.reloadKind()
|
|
|
+// this.reloadBrand()
|
|
|
+// this.reloadList()
|
|
|
+// this.reloadStoreType()
|
|
|
+// }
|
|
|
+// },
|
|
|
+// listenCrnameFlag: function (obj) {
|
|
|
+// if (obj.rmb_click_flag && obj.usd_click_flag) {
|
|
|
+// this.crname_click_flag.rmb_click_flag = false
|
|
|
+// this.crname_click_flag.usd_click_flag = false
|
|
|
+// } else {
|
|
|
+// this.crname_click_flag.rmb_click_flag = obj.rmb_click_flag
|
|
|
+// this.crname_click_flag.usd_click_flag = obj.usd_click_flag
|
|
|
+// }
|
|
|
+// },
|
|
|
setResultType: function (resultType) {
|
|
|
this.resultType = resultType
|
|
|
}
|