Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gs1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
吴迪
gs1
Commits
ec54b948
Commit
ec54b948
authored
Dec 25, 2021
by
tang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 境内码查询
parent
b113dc20
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
69 additions
and
5 deletions
+69
-5
search.js
src/axios/module/search.js
+6
-0
internal.vue
src/views/Search/internal.vue
+63
-5
No files found.
src/axios/module/search.js
View file @
ec54b948
...
...
@@ -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
,
}
src/views/Search/internal.vue
View file @
ec54b948
...
...
@@ -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
;
}
},
},
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment