Commit b113dc20 by tang

feat: 首页查询优化

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