Commit d97f4f3d authored by zhanglw's avatar zhanglw

供应商搜索

parent 2278e7c4
...@@ -73,7 +73,7 @@ ...@@ -73,7 +73,7 @@
<el-input v-model="query.minPrice" placeholder="请输入价格(元)" clearable style="width: 140px" /> <el-input v-model="query.minPrice" placeholder="请输入价格(元)" clearable style="width: 140px" />
~ ~
<el-input v-model="query.maxPrice" placeholder="请输入价格(元)" clearable style="width: 140px" /> <el-input v-model="query.maxPrice" placeholder="请输入价格(元)" clearable style="width: 140px" />
<div class="btn touch">确 定</div> <div class="btn touch" @click="search">确 定</div>
</div> </div>
</div> </div>
</el-col> </el-col>
......
...@@ -14,6 +14,19 @@ ...@@ -14,6 +14,19 @@
<breadcrumb /> <breadcrumb />
<!--查询面板--> <!--查询面板-->
<div class="search-box"> <div class="search-box">
<div class="search-tools">
<el-row :gutter="18">
<el-col :span="21">
<el-input v-model="query.keyword" clearable placeholder="请输入关键字" />
</el-col>
<el-col :span="3">
<el-button icon="el-icon-search" class="btn" @click="search">搜索</el-button>
</el-col>
</el-row>
</div>
<div class="search-keyword">
<span v-for="(item, index) in keywords" :key="index" class="label" @click="keywordClick(item, 'keyword')">{{ item.name }}</span>
</div>
<el-row style="padding-top: 16px"> <el-row style="padding-top: 16px">
<el-col :span="2"><div class="area-title">地区选择</div></el-col> <el-col :span="2"><div class="area-title">地区选择</div></el-col>
<el-col :span="22" style="border: 1px solid rgba(0,0,0,0.12);"> <el-col :span="22" style="border: 1px solid rgba(0,0,0,0.12);">
...@@ -55,7 +68,7 @@ ...@@ -55,7 +68,7 @@
<el-input v-model="query.minPrice" placeholder="请输入价格(元)" clearable style="width: 140px" /> <el-input v-model="query.minPrice" placeholder="请输入价格(元)" clearable style="width: 140px" />
~ ~
<el-input v-model="query.maxPrice" placeholder="请输入价格(元)" clearable style="width: 140px" /> <el-input v-model="query.maxPrice" placeholder="请输入价格(元)" clearable style="width: 140px" />
<div class="btn touch">确 定</div> <div class="btn touch" @click="search">确 定</div>
</div> </div>
</div> </div>
</el-col> </el-col>
...@@ -135,6 +148,7 @@ import breadcrumb from '../components/breadcrumb' ...@@ -135,6 +148,7 @@ import breadcrumb from '../components/breadcrumb'
import homeFooter from '../components/homeFooter' import homeFooter from '../components/homeFooter'
import inquiryView from '../components/inquiryView' import inquiryView from '../components/inquiryView'
import floatBtn from '../components/floatBtn' import floatBtn from '../components/floatBtn'
import { HttpReq } from '@/api/common'
export default { export default {
components: { titleMenus, userLogin, languageSetting, breadcrumb, homeFooter, inquiryView, floatBtn }, components: { titleMenus, userLogin, languageSetting, breadcrumb, homeFooter, inquiryView, floatBtn },
...@@ -155,6 +169,7 @@ export default { ...@@ -155,6 +169,7 @@ export default {
sort: false sort: false
}, },
areaOpts: [], areaOpts: [],
keywords: [],
supplierList: [ supplierList: [
{ {
isGood: true, isGood: true,
...@@ -206,13 +221,32 @@ export default { ...@@ -206,13 +221,32 @@ export default {
}, },
mounted() { mounted() {
this.$nextTick(() => { this.$nextTick(() => {
this.query = Object.assign(this.query, this.$route.params)
HttpReq.webClientApi.homePageGetSearch({
preview: false
}).then((res) => {
this.keywords = res.data.suppliers
})
}) })
}, },
methods: { methods: {
onDictReady(dict) { onDictReady(dict) {
this.areaOpts = [{ value: undefined, label: '全部' }, ...dict.area_province] this.areaOpts = [{ value: undefined, label: '全部' }, ...dict.area_province]
}, },
search() {
HttpReq.webClientApi.productGetHardwareList({
page: this.page - 1,
pageSize: this.pageSize,
...this.query
}).then((res) => {
this.hardwareList = res.data.hardwareList.data
this.total = res.data.hardwareList.total
})
},
keywordClick(item, type) {
this.query.keyword = item.name
this.search()
},
setQuertType(type) { setQuertType(type) {
if (type === this.query.type) { if (type === this.query.type) {
this.query.sort = !this.query.sort this.query.sort = !this.query.sort
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment