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
fa1a7d8e
Commit
fa1a7d8e
authored
Dec 06, 2021
by
Tang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 条码查询
parent
44792de5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
118 additions
and
85 deletions
+118
-85
gln.vue
src/views/Search/gln.vue
+16
-8
internal.vue
src/views/Search/internal.vue
+102
-77
No files found.
src/views/Search/gln.vue
View file @
fa1a7d8e
...
@@ -43,7 +43,7 @@
...
@@ -43,7 +43,7 @@
<div
class=
"title"
>
企业信息
</div>
<div
class=
"title"
>
企业信息
</div>
<div
class=
"company-info"
></div>
<div
class=
"company-info"
></div>
</
template
>
</
template
>
<span
v-else
>
您输入的商品条码格式不正确,请确认后重试。
</span>
<span
v-else
>
{{ errorMsg }}
</span>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -76,10 +76,17 @@ import { getUUID } from "@/utils/utils";
...
@@ -76,10 +76,17 @@ import { getUUID } from "@/utils/utils";
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
captchaPath
:
''
,
captchaPath
:
""
,
search
:
{
code
:
""
,
captcha
:
""
,
type
:
"GLN"
,
requestedLanguage
:
"en"
,
uuid
:
''
},
search
:
{
code
:
""
,
captcha
:
""
,
type
:
"GLN"
,
requestedLanguage
:
"en"
,
uuid
:
""
,
},
searchCodeShow
:
""
,
searchCodeShow
:
""
,
showResult
:
false
,
showResult
:
false
,
errorMsg
:
""
,
result
:
null
,
result
:
null
,
};
};
},
},
...
@@ -94,21 +101,22 @@ export default {
...
@@ -94,21 +101,22 @@ export default {
uuid
:
this
.
search
.
uuid
,
uuid
:
this
.
search
.
uuid
,
};
};
this
.
$api
.
getCaptcha
(
query
).
then
((
res
)
=>
{
this
.
$api
.
getCaptcha
(
query
).
then
((
res
)
=>
{
console
.
log
(
res
,
'res'
);
console
.
log
(
res
,
"res"
);
this
.
captchaPath
=
window
.
URL
.
createObjectURL
(
res
.
body
);
this
.
captchaPath
=
window
.
URL
.
createObjectURL
(
res
.
body
);
});
});
},
},
async
handleSearch
()
{
async
handleSearch
()
{
this
.
searchCodeShow
=
this
.
search
.
code
;
this
.
searchCodeShow
=
this
.
search
.
code
;
this
.
showResult
=
true
;
this
.
showResult
=
true
;
const
params
=
{...
this
.
search
};
const
params
=
{
...
this
.
search
};
const
searchGlnRes
=
const
searchGlnRes
=
await
this
.
$api
.
search
.
searchGln
(
params
);
await
this
.
$api
.
search
.
searchGln
(
params
);
const
{
returnCode
,
data
}
=
searchGlnRes
;
const
{
returnCode
,
data
}
=
searchGlnRes
;
console
.
log
(
searchGlnRes
,
'searchGlnRes'
);
if
(
returnCode
===
"0"
)
{
if
(
returnCode
===
"0"
)
{
this
.
result
=
data
;
this
.
result
=
data
;
}
else
{
}
else
{
this
.
errorMsg
=
searchGlnRes
.
returnMsg
||
"您输入的商品条码格式不正确,请确认后重试。"
;
this
.
result
=
null
;
this
.
result
=
null
;
}
}
},
},
...
...
src/views/Search/internal.vue
View file @
fa1a7d8e
...
@@ -4,48 +4,64 @@
...
@@ -4,48 +4,64 @@
<div
class=
"body"
>
<div
class=
"body"
>
<el-tabs
v-model=
"activeName"
class=
"tab-no-bottom"
>
<el-tabs
v-model=
"activeName"
class=
"tab-no-bottom"
>
<el-tab-pane
label=
"查询厂商信息"
name=
"first"
>
<el-tab-pane
label=
"查询厂商信息"
name=
"first"
>
<div
style=
"padding-top:20px"
>
<div
style=
"padding-top:
20px"
>
<el-radio-group
v-model=
"company"
>
<el-radio-group
v-model=
"company"
>
<el-radio
:label=
"CODE"
>
根据厂商识别代码查询
</el-radio>
<el-radio
:label=
"CODE"
>
根据厂商识别代码查询
</el-radio>
<el-radio
:label=
"NAME"
>
根据厂商名称查询
</el-radio>
<el-radio
:label=
"NAME"
>
根据厂商名称查询
</el-radio>
<el-radio
:label=
"ADDRESS"
>
根据厂商
名称
查询
</el-radio>
<el-radio
:label=
"ADDRESS"
>
根据厂商
地址
查询
</el-radio>
</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
type=
"primary"
class=
"w240"
icon=
"gs-guard-icon"
@
click=
"handelVerification"
>
<el-button
type=
"primary"
class=
"w240"
icon=
"gs-guard-icon"
@
click=
"handelVerification"
v-if=
"!isVerificationPass"
>
点击此处进行验证
点击此处进行验证
</el-button>
</el-button>
<el-button
style=
"margin-left:40px"
type=
"primary"
@
click=
"handleSearchCompany"
<el-button
>
查询
type=
"success"
</el-button
class=
"w240"
icon=
"el-icon-circle-check"
v-else
>
>
验证通过
</el-button>
<el-button
style=
"margin-left: 40px"
type=
"primary"
@
click=
"handleSearchCompany"
>
查询
</el-button>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
</div>
</div>
...
@@ -53,72 +69,78 @@
...
@@ -53,72 +69,78 @@
<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
style=
"margin-left:40px"
type=
"primary"
@
click=
"handleSearchProduct"
<el-button
>
查询
style=
"margin-left: 40px"
</el-button
type=
"primary"
>
@
click=
"handleSearchProduct"
>
查询
</el-button>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
</el-tab-pane>
</el-tab-pane>
</el-tabs>
</el-tabs>
<!--查询结果-->
<!--查询结果-->
<div
class=
"result-box"
v-if=
"showResult
&&activeName===
'first'"
>
<div
class=
"result-box"
v-if=
"showResult
&& activeName ===
'first'"
>
<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"
>
<!--结果表格-->
<!--结果表格-->
<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"
<el-table-column
prop=
"id"
label=
"厂商识别代码"
width=
"180"
>
label=
"厂商识别代码"
width=
"180"
>
<template
slot-scope=
"scope"
>
<template
slot-scope=
"scope"
>
<span
type=
"text"
class=
"hover"
size=
"small"
>
{{
scope
.
row
.
id
}}
</span>
<span
type=
"text"
class=
"hover"
size=
"small"
>
{{
scope
.
row
.
id
}}
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
prop=
"name"
label=
"厂商名称"
width=
"180"
>
prop=
"name"
label=
"厂商名称"
width=
"180"
>
</el-table-column>
<el-table-column
prop=
"status"
label=
"状态"
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
prop=
"status"
label=
"状态"
>
</el-table-column>
label=
"详细"
>
<el-table-column
label=
"详细"
>
<
template
>
<
template
>
<span
type=
"text"
class=
"hover pointer"
@
click=
"handleCheck()"
size=
"small"
>
详情
</span>
<span
type=
"text"
class=
"hover pointer"
@
click=
"handleCheck()"
size=
"small"
>
详情
</span
>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
label=
"查看"
>
label=
"查看"
>
<
template
>
<
template
>
<span
type=
"text"
class=
"hover pointer"
@
click=
"handleCheck()"
size=
"small"
>
查看
</span>
<span
type=
"text"
class=
"hover pointer"
@
click=
"handleCheck()"
size=
"small"
>
查看
</span
>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
...
@@ -131,7 +153,7 @@
...
@@ -131,7 +153,7 @@
<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、商品条码
1、商品条码
(又称全球贸易项目代码GTIN)是指包含厂商识别代码在内的对零售商品、非零售商品、物流单元、位置、资产及服务进行全球惟一标识的一种代码(或称数据结构)。对贸易项目进行编码和符号表示(前缀码为690-699是境内条码),能够实现商品零售(POS)、进货、存货管理、自动补货、销售分析及其它业务运作的自动化。
(又称全球贸易项目代码GTIN)是指包含厂商识别代码在内的对零售商品、非零售商品、物流单元、位置、资产及服务进行全球惟一标识的一种代码(或称数据结构)。对贸易项目进行编码和符号表示(前缀码为690-699是境内条码),能够实现商品零售(POS)、进货、存货管理、自动补货、销售分析及其它业务运作的自动化。
...
@@ -140,9 +162,7 @@
...
@@ -140,9 +162,7 @@
<p>
<p>
2、厂商信息查询结果说明:自中国物品编码中心为企业颁发《系统成员证书》当日起计,7天后,在线公布该企业的名称、厂商识别代码及证书颁发日期等信息;15天后,将公布该企业的具体注册信息。
2、厂商信息查询结果说明:自中国物品编码中心为企业颁发《系统成员证书》当日起计,7天后,在线公布该企业的名称、厂商识别代码及证书颁发日期等信息;15天后,将公布该企业的具体注册信息。
</p>
</p>
<p>
<p>
3、本查询仅适用于中华人民共和国境内注册的商品条码信息。
</p>
3、本查询仅适用于中华人民共和国境内注册的商品条码信息。
</p>
</div>
</div>
</div>
</div>
...
@@ -164,6 +184,7 @@ export default {
...
@@ -164,6 +184,7 @@ export default {
NAME
,
NAME
,
ADDRESS
,
ADDRESS
,
isShowVcode
:
false
,
isShowVcode
:
false
,
isVerificationPass
:
false
,
activeName
:
"first"
,
activeName
:
"first"
,
company
:
CODE
,
company
:
CODE
,
companySearch
:
{
companySearch
:
{
...
@@ -175,7 +196,7 @@ export default {
...
@@ -175,7 +196,7 @@ export default {
code
:
""
,
code
:
""
,
},
},
result
:
null
,
result
:
null
,
searchCodeShow
:
''
,
searchCodeShow
:
""
,
showResult
:
false
,
showResult
:
false
,
};
};
},
},
...
@@ -185,7 +206,7 @@ export default {
...
@@ -185,7 +206,7 @@ export default {
methods
:
{
methods
:
{
// 点击此处进行验证
// 点击此处进行验证
handelVerification
()
{
handelVerification
()
{
console
.
log
(
'点击此处进行验证'
);
console
.
log
(
"点击此处进行验证"
);
this
.
isShowVcode
=
true
;
this
.
isShowVcode
=
true
;
},
},
// 验证结束
// 验证结束
...
@@ -195,30 +216,32 @@ export default {
...
@@ -195,30 +216,32 @@ export default {
// 通过验证后
// 通过验证后
onSuccess
()
{
onSuccess
()
{
this
.
isShowVcode
=
false
;
// 通过验证后,需要手动关闭模态框
this
.
isShowVcode
=
false
;
// 通过验证后,需要手动关闭模态框
console
.
log
(
"SUCCESS"
);
this
.
isVerificationPass
=
true
;
},
},
// 查看按钮
// 查看按钮
handleCheck
(
row
)
{
handleCheck
(
row
)
{
console
.
log
(
row
)
console
.
log
(
row
)
;
},
},
// 详情按钮
// 详情按钮
handleDetail
(
row
)
{
handleDetail
(
row
)
{
console
.
log
(
row
)
console
.
log
(
row
)
;
},
},
handleSearchCompany
()
{
handleSearchCompany
()
{
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
;
...
@@ -228,7 +251,9 @@ export default {
...
@@ -228,7 +251,9 @@ export default {
},
},
handleSearchProduct
()
{
handleSearchProduct
()
{
window
.
open
(
`http://search.anccnet.com/searchResult2.aspx?keyword=
${
this
.
productSearch
.
code
}
`
)
window
.
open
(
`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