Commit b113dc20 by tang

feat: 首页查询优化

parent 8c8c2994
......@@ -325,9 +325,9 @@
<div class="chaxun-kj">
<div class="row">
<div class="col-lg-2 chaxun-left">
<el-select v-model="chaxun.type" placeholder="请选择">
<el-select v-model="chaxun.type2" placeholder="请选择">
<el-option
v-for="(item, i) in chaxun.options"
v-for="(item, i) in chaxun.options2"
:key="i"
:label="item.label"
:value="item.value"
......@@ -337,14 +337,14 @@
</div>
<div class="col-lg-7 chaxun-middle">
<el-input
placeholder="请输入厂商名称"
placeholder="请输入13位或14位的商品条码"
v-model="chaxun.keywords"
clearable
>
</el-input>
</div>
<div class="col-lg-3 chaxun-right">
<button @click="toSearch(chaxun.type,chaxun.keywords,'product')">境内条码查询</button>
<button @click="toSearch(chaxun.type2,chaxun.keywords,'product')">境内条码查询</button>
</div>
</div>
</div>
......@@ -631,11 +631,23 @@ export default {
],
chaxun: {
type: "1",
type2:'',
options: [
{
label: "根据厂商名称查询",
label: "根据厂商识别代码查询",
value: "1",
},
{
label: "根据厂商名称查询",
value: "2",
},
{
label: "根据厂商地址查询",
value: "3",
},
],
options2: [
],
keywords: "",
},
......
......@@ -105,14 +105,14 @@
header-cell-class-name="search-table-hc"
style="width: 100%"
>
<el-table-column prop="id" label="厂商识别代码" width="180">
<el-table-column prop="_source.code" label="厂商识别代码" width="180">
<template slot-scope="scope">
<span type="text" class="hover" size="small">{{
scope.row.id
}}</span>
</template>
</el-table-column>
<el-table-column prop="name" label="厂商名称" width="180">
<el-table-column prop="_source.firm_name" label="厂商名称" width="180">
</el-table-column>
<el-table-column prop="status" label="状态"></el-table-column>
<el-table-column label="详细">
......@@ -219,7 +219,7 @@ export default {
this.productSearch.code = this.$route.query.keyword
}else if(this.$route.query.infoType === 'company'){
this.activeName = 'first'
this.company = NAME
this.company = this.$route.query.type
this.companySearch.name = this.$route.query.keyword
}
}
......@@ -261,7 +261,7 @@ export default {
const searchGlnRes = await this.$api.search.searchInternal(params);
const {returnCode, data} = searchGlnRes;
if (returnCode === "0") {
this.result = [data];
this.result = [data.hits.hits];
} else {
this.errorMsg =
searchGlnRes.returnMsg ||
......
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