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
e8f7ca36
Commit
e8f7ca36
authored
Dec 07, 2021
by
Tang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 境内码查询接口
parent
7fa690ac
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
90 additions
and
83 deletions
+90
-83
search.js
src/axios/module/search.js
+7
-1
internal.vue
src/views/Search/internal.vue
+83
-82
No files found.
src/axios/module/search.js
View file @
e8f7ca36
...
@@ -5,7 +5,7 @@ import {
...
@@ -5,7 +5,7 @@ import {
const
Prefix
=
process
.
env
.
NODE_ENV
===
'development'
?
'/gs1'
:
''
;
const
Prefix
=
process
.
env
.
NODE_ENV
===
'development'
?
'/gs1'
:
''
;
// 条码查询—GLN查询/境外码查询
// 条码查询—GLN查询/境外码查询
const
searchGln
=
(
params
=
{})
=>
{
const
searchGln
=
(
params
=
{})
=>
{
return
POST
(
`
${
Prefix
}
/office/codeSearch/api/gln`
,
params
)
return
POST
(
`
${
Prefix
}
/office/codeSearch/api/gln`
,
params
)
}
}
...
@@ -15,8 +15,14 @@ const searchGetList = (params = {}) => {
...
@@ -15,8 +15,14 @@ const searchGetList = (params = {}) => {
return
POST
(
`
${
Prefix
}
/office/shortcode/api/getList`
,
params
)
return
POST
(
`
${
Prefix
}
/office/shortcode/api/getList`
,
params
)
}
}
// 条码查询—境内码查询
const
searchInternal
=
(
params
=
{})
=>
{
return
POST
(
`
${
Prefix
}
/office/codeSearch/api/domesticCode`
,
params
)
}
export
default
{
export
default
{
searchGln
,
searchGln
,
searchGetList
,
searchGetList
,
searchInternal
}
}
src/views/Search/internal.vue
View file @
e8f7ca36
...
@@ -12,55 +12,55 @@
...
@@ -12,55 +12,55 @@
</el-radio-group>
</el-radio-group>
<el-form
<el-form
label-position=
"left"
label-position=
"left"
label-width=
"180px"
label-width=
"180px"
style=
"margin-top: 40px"
style=
"margin-top: 40px"
:model=
"companySearch"
:model=
"companySearch"
>
>
<el-form-item
label=
"境内商品条码信息查询:"
>
<el-form-item
label=
"境内商品条码信息查询:"
>
<el-input
<el-input
v-show=
"company === CODE"
v-show=
"company === CODE"
v-model=
"companySearch.code"
v-model=
"companySearch.code"
placeholder=
"请输入正确的厂商识别代码!"
placeholder=
"请输入正确的厂商识别代码!"
class=
"w240"
class=
"w240"
></el-input>
></el-input>
<el-input
<el-input
v-show=
"company === NAME"
v-show=
"company === NAME"
v-model=
"companySearch.name"
v-model=
"companySearch.name"
placeholder=
"请输入正确的商品条码!"
placeholder=
"请输入正确的商品条码!"
class=
"w240"
class=
"w240"
></el-input>
></el-input>
<el-input
<el-input
v-show=
"company === ADDRESS"
v-show=
"company === ADDRESS"
v-model=
"companySearch.address"
v-model=
"companySearch.address"
placeholder=
"请输入正确的厂商名称!"
placeholder=
"请输入正确的厂商名称!"
class=
"w240"
class=
"w240"
></el-input>
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
label=
"验证码:"
>
<el-form-item
label=
"验证码:"
>
<el-button
<el-button
type=
"primary"
type=
"primary"
class=
"w240"
class=
"w240"
icon=
"gs-guard-icon"
icon=
"gs-guard-icon"
@
click=
"handleVerification"
@
click=
"handleVerification"
v-if=
"!isVerificationPass"
v-if=
"!isVerificationPass"
>
>
点击此处进行验证
点击此处进行验证
</el-button>
</el-button>
<el-button
<el-button
type=
"success"
type=
"success"
class=
"w240"
class=
"w240"
icon=
"el-icon-circle-check"
icon=
"el-icon-circle-check"
v-else
v-else
>
>
验证通过
验证通过
</el-button>
</el-button>
<el-button
<el-button
style=
"margin-left: 40px"
style=
"margin-left: 40px"
type=
"primary"
type=
"primary"
@
click=
"handleSearchCompany"
@
click=
"handleSearchCompany"
>
查询
>
查询
</el-button>
</el-button>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
...
@@ -69,31 +69,31 @@
...
@@ -69,31 +69,31 @@
<el-tab-pane
label=
"查询产品信息"
name=
"second"
>
<el-tab-pane
label=
"查询产品信息"
name=
"second"
>
<el-form
<el-form
label-position=
"left"
label-position=
"left"
label-width=
"180px"
label-width=
"180px"
style=
"margin-top: 20px"
style=
"margin-top: 20px"
:model=
"productSearch"
:model=
"productSearch"
>
>
<el-form-item
label=
"境内商品条码信息查询:"
>
<el-form-item
label=
"境内商品条码信息查询:"
>
<el-input
<el-input
v-model=
"productSearch.code"
v-model=
"productSearch.code"
placeholder=
"请输入13位或14位的商品条码"
placeholder=
"请输入13位或14位的商品条码"
class=
"w240"
class=
"w240"
></el-input>
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
label=
"验证码:"
>
<el-form-item
label=
"验证码:"
>
<el-button
type=
"primary"
class=
"w240"
>
<el-button
type=
"primary"
class=
"w240"
>
<div
style=
"diplay: flex; align-item: center"
>
<div
style=
"diplay: flex; align-item: center"
>
<img
style=
"height: 14px"
src=
"./img/guard.png"
alt=
""
/>
<img
style=
"height: 14px"
src=
"./img/guard.png"
alt=
""
/>
点击此处进行验证
点击此处进行验证
</div>
</div>
</el-button>
</el-button>
<el-button
<el-button
style=
"margin-left: 40px"
style=
"margin-left: 40px"
type=
"primary"
type=
"primary"
@
click=
"handleSearchProduct"
@
click=
"handleSearchProduct"
>
查询
>
查询
</el-button>
</el-button>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
...
@@ -107,39 +107,39 @@
...
@@ -107,39 +107,39 @@
<template
v-if=
"result"
>
<template
v-if=
"result"
>
<!--结果表格-->
<!--结果表格-->
<el-table
<el-table
:data=
"result"
:data=
"result"
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=
"id"
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=
"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=
"详细"
>
<
template
>
<
template
>
<span
<span
type=
"text"
type=
"text"
class=
"hover pointer"
class=
"hover pointer"
@
click=
"handleCheck()"
@
click=
"handleCheck()"
size=
"small"
size=
"small"
>
详情
</span
>
详情
</span
>
>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"查看"
>
<el-table-column
label=
"查看"
>
<
template
>
<
template
>
<span
<span
type=
"text"
type=
"text"
class=
"hover pointer"
class=
"hover pointer"
@
click=
"handleCheck()"
@
click=
"handleCheck()"
size=
"small"
size=
"small"
>
查看
</span
>
查看
</span
>
>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
...
@@ -153,20 +153,20 @@
...
@@ -153,20 +153,20 @@
<div
class=
"notice"
>
<div
class=
"notice"
>
<div
class=
"title"
>
友情提示
</div>
<div
class=
"title"
>
友情提示
</div>
<div
class=
"content-wrapper"
>
<div
class=
"content-wrapper"
>
<img
src=
"./img/pic_ex_jl.png"
align=
"right"
alt=
""
/>
<img
src=
"./img/pic_ex_jl.png"
align=
"right"
alt=
""
/>
<p>
<p>
1、
<a
1、
<a
href=
"http://www.ancc.org.cn/Knowledge/goodsGln.aspx"
href=
"http://www.ancc.org.cn/Knowledge/goodsGln.aspx"
target=
"_blank"
target=
"_blank"
style=
"color: #5ac8fa"
style=
"color: #5ac8fa"
>
商品条码
</a
>
商品条码
</a
>
>
(又称全球贸易项目代码GTIN)是指包含厂商识别代码在内的对零售商品、非零售商品、物流单元、位置、资产及服务进行全球惟一标识的一种代码(或称数据结构)。对贸易项目进行编码和符号表示(前缀码为690-699是境内条码),能够实现商品零售(POS)、进货、存货管理、自动补货、销售分析及其它业务运作的自动化。
(又称全球贸易项目代码GTIN)是指包含厂商识别代码在内的对零售商品、非零售商品、物流单元、位置、资产及服务进行全球惟一标识的一种代码(或称数据结构)。对贸易项目进行编码和符号表示(前缀码为690-699是境内条码),能够实现商品零售(POS)、进货、存货管理、自动补货、销售分析及其它业务运作的自动化。
<a
<a
href=
"http://www.ancc.org.cn/Knowledge/goodsGln.aspx"
href=
"http://www.ancc.org.cn/Knowledge/goodsGln.aspx"
target=
"_blank"
target=
"_blank"
style=
"color: #5ac8fa"
style=
"color: #5ac8fa"
>
了解更多 >>
</a
>
了解更多 >>
</a
>
>
</p>
</p>
<p
style=
"color: #ff3b30"
>
<p
style=
"color: #ff3b30"
>
...
@@ -178,12 +178,12 @@
...
@@ -178,12 +178,12 @@
</div>
</div>
</div>
</div>
<Vcode
:show=
"isShowVcode"
@
success=
"onSuccess"
@
close=
"onClose"
/>
<Vcode
:show=
"isShowVcode"
@
success=
"onSuccess"
@
close=
"onClose"
/>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
{
getUUID
}
from
"@/utils/utils"
;
import
{
getUUID
}
from
"@/utils/utils"
;
import
Vcode
from
"vue-puzzle-vcode"
;
import
Vcode
from
"vue-puzzle-vcode"
;
const
CODE
=
'1'
;
const
CODE
=
'1'
;
...
@@ -210,6 +210,7 @@ export default {
...
@@ -210,6 +210,7 @@ export default {
},
},
result
:
null
,
result
:
null
,
searchCodeShow
:
""
,
searchCodeShow
:
""
,
errorMsg
:
""
,
showResult
:
false
,
showResult
:
false
,
};
};
},
},
...
@@ -244,26 +245,26 @@ export default {
...
@@ -244,26 +245,26 @@ export default {
this
.
showResult
=
true
;
this
.
showResult
=
true
;
if
(
this
.
company
===
CODE
)
{
if
(
this
.
company
===
CODE
)
{
this
.
searchCodeShow
=
this
.
companySearch
.
code
;
this
.
searchCodeShow
=
this
.
companySearch
.
code
;
if
(
this
.
companySearch
.
code
===
"1"
)
{
//
if (this.companySearch.code === "1") {
this
.
result
=
[
//
this.result = [
{
id
:
"6912614"
,
name
:
"北京阿里巴巴食品有限公司"
,
状态
:
"已注销"
},
//
{ id: "6912614", name: "北京阿里巴巴食品有限公司", 状态: "已注销" },
{
id
:
"6912614"
,
name
:
"北京阿里巴巴食品有限公司"
,
状态
:
"已注销"
},
//
{ id: "6912614", name: "北京阿里巴巴食品有限公司", 状态: "已注销" },
{
id
:
"6912614"
,
name
:
"北京阿里巴巴食品有限公司"
,
状态
:
"已注销"
},
//
{ id: "6912614", name: "北京阿里巴巴食品有限公司", 状态: "已注销" },
{
id
:
"6912614"
,
name
:
"北京阿里巴巴食品有限公司"
,
状态
:
"已注销"
},
//
{ id: "6912614", name: "北京阿里巴巴食品有限公司", 状态: "已注销" },
{
id
:
"6912614"
,
name
:
"北京阿里巴巴食品有限公司"
,
状态
:
"已注销"
},
//
{ id: "6912614", name: "北京阿里巴巴食品有限公司", 状态: "已注销" },
{
id
:
"6912614"
,
name
:
"北京阿里巴巴食品有限公司"
,
状态
:
"已注销"
},
//
{ id: "6912614", name: "北京阿里巴巴食品有限公司", 状态: "已注销" },
{
id
:
"6912614"
,
name
:
"北京阿里巴巴食品有限公司"
,
状态
:
"已注销"
},
//
{ id: "6912614", name: "北京阿里巴巴食品有限公司", 状态: "已注销" },
{
id
:
"6912614"
,
name
:
"北京阿里巴巴食品有限公司"
,
状态
:
"已注销"
},
//
{ id: "6912614", name: "北京阿里巴巴食品有限公司", 状态: "已注销" },
];
//
];
}
//
}
}
else
if
(
this
.
company
===
NAME
)
{
}
else
if
(
this
.
company
===
NAME
)
{
this
.
searchCodeShow
=
this
.
companySearch
.
name
;
this
.
searchCodeShow
=
this
.
companySearch
.
name
;
}
else
{
}
else
{
this
.
searchCodeShow
=
this
.
companySearch
.
address
;
this
.
searchCodeShow
=
this
.
companySearch
.
address
;
}
}
const
params
=
{
type
:
this
.
company
,
uuid
:
getUUID
()
};
const
params
=
{
type
:
this
.
company
,
uuid
:
getUUID
(),
code
:
this
.
searchCodeShow
,
captcha
:
"7n8df"
,
};
const
searchGlnRes
=
await
this
.
$api
.
search
.
search
Gln
(
params
);
const
searchGlnRes
=
await
this
.
$api
.
search
.
search
Internal
(
params
);
const
{
returnCode
,
data
}
=
searchGlnRes
;
const
{
returnCode
,
data
}
=
searchGlnRes
;
if
(
returnCode
===
"0"
)
{
if
(
returnCode
===
"0"
)
{
this
.
result
=
[
data
];
this
.
result
=
[
data
];
}
else
{
}
else
{
...
@@ -276,7 +277,7 @@ export default {
...
@@ -276,7 +277,7 @@ export default {
handleSearchProduct
()
{
handleSearchProduct
()
{
window
.
open
(
window
.
open
(
`http://search.anccnet.com/searchResult2.aspx?keyword=
${
this
.
productSearch
.
code
}
`
`http://search.anccnet.com/searchResult2.aspx?keyword=
${
this
.
productSearch
.
code
}
`
);
);
},
},
},
},
...
...
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