Commit ec54b948 by tang

feat: 境内码查询

parent b113dc20
...@@ -19,6 +19,11 @@ const searchInternal = (params = {}) => { ...@@ -19,6 +19,11 @@ const searchInternal = (params = {}) => {
return POST(`${Prefix}/office/codeSearch/api/domesticCode`, params) return POST(`${Prefix}/office/codeSearch/api/domesticCode`, params)
} }
// 条码查询-境内码商品信息
const searchInternalProduct = (params = {}) => {
return POST(`${Prefix}/office/production/api/search`, params)
}
// 条码查询—自行车企业代码公告查询 // 条码查询—自行车企业代码公告查询
const searchBike = (params = {}) => { const searchBike = (params = {}) => {
return POST(`${Prefix}/office/bikefirm/api/getBikeFirm`, params) return POST(`${Prefix}/office/bikefirm/api/getBikeFirm`, params)
...@@ -33,6 +38,7 @@ export default { ...@@ -33,6 +38,7 @@ export default {
searchGln, searchGln,
searchGetList, searchGetList,
searchInternal, searchInternal,
searchInternalProduct,
searchBike, searchBike,
searchGlossary, searchGlossary,
} }
...@@ -95,7 +95,54 @@ ...@@ -95,7 +95,54 @@
</el-tabs> </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-title">查询 {{ searchCodeShow }} 结果</div>
<div class="result-box-body"> <div class="result-box-body">
<template v-if="result"> <template v-if="result">
...@@ -204,6 +251,7 @@ export default { ...@@ -204,6 +251,7 @@ export default {
code: "", code: "",
}, },
result: null, result: null,
resultType:'company',
searchCodeShow: "", searchCodeShow: "",
errorMsg: "", errorMsg: "",
showResult: false, showResult: false,
...@@ -250,6 +298,7 @@ export default { ...@@ -250,6 +298,7 @@ export default {
}, },
async handleSearchCompany() { async handleSearchCompany() {
this.showResult = true; this.showResult = true;
this.resultType= 'company'
if (this.company === CODE) { if (this.company === CODE) {
this.searchCodeShow = this.companySearch.code; this.searchCodeShow = this.companySearch.code;
} else if (this.company === NAME) { } else if (this.company === NAME) {
...@@ -271,10 +320,19 @@ export default { ...@@ -271,10 +320,19 @@ export default {
this.getCaptcha(); this.getCaptcha();
}, },
handleSearchProduct() { async handleSearchProduct() {
window.open( this.showResult = true;
`http://search.anccnet.com/searchResult2.aspx?keyword=${this.productSearch.code}` 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