Commit ec54b948 by tang

feat: 境内码查询

parent b113dc20
......@@ -19,6 +19,11 @@ const searchInternal = (params = {}) => {
return POST(`${Prefix}/office/codeSearch/api/domesticCode`, params)
}
// 条码查询-境内码商品信息
const searchInternalProduct = (params = {}) => {
return POST(`${Prefix}/office/production/api/search`, params)
}
// 条码查询—自行车企业代码公告查询
const searchBike = (params = {}) => {
return POST(`${Prefix}/office/bikefirm/api/getBikeFirm`, params)
......@@ -33,6 +38,7 @@ export default {
searchGln,
searchGetList,
searchInternal,
searchInternalProduct,
searchBike,
searchGlossary,
}
......@@ -95,7 +95,54 @@
</el-tabs>
<!--查询结果-->
<div class="result-box" v-if="showResult && activeName === 'first'">
<div class="result-box" v-show="showResult && resultType === 'company'">
<div class="result-box-title">查询 {{ searchCodeShow }} 结果</div>
<div class="result-box-body">
<template v-if="result">
<!--结果表格-->
<el-table
:data="result"
header-cell-class-name="search-table-hc"
style="width: 100%"
>
<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="_source.firm_name" label="厂商名称" width="180">
</el-table-column>
<el-table-column prop="status" label="状态"></el-table-column>
<el-table-column label="详细">
<template>
<span
type="text"
class="hover pointer"
@click="handleCheck()"
size="small"
>详情</span
>
</template>
</el-table-column>
<el-table-column label="查看">
<template>
<span
type="text"
class="hover pointer"
@click="handleCheck()"
size="small"
>查看</span
>
</template>
</el-table-column>
</el-table>
</template>
<span style="color: rgb(255, 59, 48)" v-else>{{ errorMsg }}</span>
</div>
</div>
<div class="result-box" v-show="showResult && resultType === 'product'">
<div class="result-box-title">查询 {{ searchCodeShow }} 结果</div>
<div class="result-box-body">
<template v-if="result">
......@@ -204,6 +251,7 @@ export default {
code: "",
},
result: null,
resultType:'company',
searchCodeShow: "",
errorMsg: "",
showResult: false,
......@@ -250,6 +298,7 @@ export default {
},
async handleSearchCompany() {
this.showResult = true;
this.resultType= 'company'
if (this.company === CODE) {
this.searchCodeShow = this.companySearch.code;
} else if (this.company === NAME) {
......@@ -271,10 +320,19 @@ export default {
this.getCaptcha();
},
handleSearchProduct() {
window.open(
`http://search.anccnet.com/searchResult2.aspx?keyword=${this.productSearch.code}`
);
async handleSearchProduct() {
this.showResult = true;
this.resultType= 'product'
const params = {uuid: this.uuid, keyword: this.productSearch.code, captcha: this.captcha,};
const searchGlnRes = await this.$api.search.searchInternalProduct(params);
if (returnCode === "0") {
this.result = [data.hits.hits];
} else {
this.errorMsg =
searchGlnRes.returnMsg ||
"没有符合条件的记录!";
this.result = null;
}
},
},
};
......
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