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
7fa690ac
Commit
7fa690ac
authored
Dec 07, 2021
by
Jianli Ou
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://gitee.com/gs1-office-web-sit/gs1
parents
ce035151
be17bdbe
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
243 additions
and
122 deletions
+243
-122
business.js
src/axios/module/business.js
+12
-0
Notice.vue
src/views/Business/Notice.vue
+59
-18
gln.vue
src/views/Search/gln.vue
+28
-13
internal.vue
src/views/Search/internal.vue
+132
-83
pages.vue
src/views/comps/pages.vue
+12
-8
No files found.
src/axios/module/business.js
View file @
7fa690ac
...
...
@@ -15,7 +15,19 @@ const businessGetTop4 = (params = {}) => {
return
POST
(
`
${
Prefix
}
/office/policy/api/getTop4`
,
params
)
}
// 条码注册/注销公告
const
businessGetEanUpcByCondition
=
(
params
=
{})
=>
{
return
POST
(
`
${
Prefix
}
/office/eanupc/api/getEanUpcByCondition`
,
params
)
}
// 条码注册/注销公告详情
const
businessGetDetailById
=
(
params
=
{})
=>
{
return
POST
(
`
${
Prefix
}
/office/eanupc/api/getDetailById`
,
params
)
}
export
default
{
businessDownLoad
,
businessGetTop4
,
businessGetEanUpcByCondition
,
businessGetDetailById
,
}
src/views/Business/Notice.vue
View file @
7fa690ac
...
...
@@ -20,7 +20,7 @@
aria-selected="true"
@click="jump(i)"
>
{{
tmp
.
name
}}
{{
tmp
.
name
}}
</button>
</li>
</ul>
...
...
@@ -38,7 +38,7 @@
:aria-labelledby="tmp.type + '-tab'"
>
<list
:list=
"tmp.data"
/>
<pages
/>
<pages
:pages=
"pageParams"
@
toPagesFather=
"receivePagesChild"
/>
</div>
</div>
</div>
...
...
@@ -68,14 +68,7 @@ export default {
link
:
"/Business/Notice"
,
active
:
"zhuce"
,
data
:
[
{
name
:
"武隆区陈氏面条加工坊"
,
time
:
"2021-09-30"
,
},
{
name
:
"重庆功存科技有限公司"
,
time
:
"2021-09-30"
,
},
],
},
{
...
...
@@ -84,22 +77,70 @@ export default {
link
:
"/Business/Notice"
,
active
:
"zhuxiao"
,
data
:
[
{
name
:
"杭州瀚扬科技有限公司"
,
time
:
"2021-09-22"
,
},
{
name
:
"贵州国伟自由行智能科技有限公司"
,
time
:
"2021-09-07"
,
},
],
},
],
pageParams
:
{
currentPage
:
1
,
pageSize
:
10
,
pageCount
:
5
,
total
:
100
,
},
logoutFlag
:
"1"
,
};
},
created
()
{
this
.
init
();
},
methods
:
{
init
()
{
this
.
setLogoutFlag
(
this
.
$route
.
query
.
id
);
},
setLogoutFlag
(
currentTab
)
{
if
(
currentTab
===
"zhuce"
)
{
this
.
logoutFlag
=
"1"
;
}
else
{
this
.
logoutFlag
=
"0"
;
}
this
.
businessGetEanUpcByCondition
();
},
// 条码注册/注销公告
async
businessGetEanUpcByCondition
()
{
const
params
=
{
page
:
this
.
pageParams
.
currentPage
,
limit
:
this
.
pageParams
.
pageSize
,
logoutFlag
:
this
.
logoutFlag
,
};
console
.
log
(
params
,
"params"
);
const
businessGetEanUpcByConditionRes
=
await
this
.
$api
.
business
.
businessGetEanUpcByCondition
(
params
);
const
{
returnCode
,
data
}
=
businessGetEanUpcByConditionRes
;
if
(
returnCode
===
"0"
)
{
console
.
log
(
businessGetEanUpcByConditionRes
,
"条码注册/注销公告"
);
this
.
pageParams
.
total
=
data
.
totalCount
;
let
key
;
if
(
this
.
logoutFlag
===
'1'
)
{
key
=
0
;
}
else
{
key
=
1
;
}
data
.
list
.
forEach
(
el
=>
{
el
.
name
=
el
.
firmName
;
el
.
time
=
this
.
$moment
(
el
.
logDate
).
format
(
'YYYY-MM-DD'
);
});
this
.
list
[
key
].
data
=
data
.
list
console
.
log
(
this
.
list
,
'this.list'
);
}
},
// 接收分页子组件传过来的值
receivePagesChild
(
val
)
{
this
.
pageParams
.
currentPage
=
val
;
this
.
businessGetEanUpcByCondition
();
},
jump
(
i
)
{
// console.log(i);
this
.
setLogoutFlag
(
this
.
list
[
i
].
active
);
this
.
$router
.
push
({
path
:
this
.
list
[
i
].
link
,
query
:
{
...
...
src/views/Search/gln.vue
View file @
7fa690ac
...
...
@@ -38,12 +38,19 @@
<div
class=
"result-box-title"
>
查询
{{
searchCodeShow
}}
结果
</div>
<div
class=
"result-box-body"
>
<template
v-if=
"result"
>
<div
class=
"title"
>
商品信息
</div>
<div
class=
"product-info"
></div>
<div
class=
"title"
>
企业信息
</div>
<div
class=
"company-info"
></div>
<el-table
:data=
"result"
header-cell-class-name=
"search-table-hc"
style=
"width: 100%"
>
<el-table-column
prop=
"gepirRequestedKey.requestedKeyValue"
label=
"GLN"
width=
"180"
>
</el-table-column>
<el-table-column
prop=
"address.name"
label=
"企业名称(含英文)"
width=
"180"
>
</el-table-column>
<el-table-column
prop=
"address.streetAddressOne"
label=
"中文地址"
></el-table-column>
<el-table-column
prop=
"status"
label=
"英文地址"
>
</el-table-column>
</el-table>
</
template
>
<span
v-else
>
您输入的商品条码格式不正确,请确认后重试。
</span>
<span
style=
"color: rgb(255, 59, 48)"
v-else
>
{{ errorMsg }}
</span>
</div>
</div>
</div>
...
...
@@ -78,10 +85,17 @@ import { getUUID } from "@/utils/utils";
export
default
{
data
()
{
return
{
captchaPath
:
''
,
search
:
{
code
:
""
,
captcha
:
""
,
type
:
"GLN"
,
requestedLanguage
:
"en"
,
uuid
:
''
},
captchaPath
:
""
,
search
:
{
code
:
""
,
captcha
:
""
,
type
:
"GLN"
,
requestedLanguage
:
"en"
,
uuid
:
""
,
},
searchCodeShow
:
""
,
showResult
:
false
,
errorMsg
:
""
,
result
:
null
,
};
},
...
...
@@ -96,21 +110,22 @@ export default {
uuid
:
this
.
search
.
uuid
,
};
this
.
$api
.
getCaptcha
(
query
).
then
((
res
)
=>
{
console
.
log
(
res
,
'res'
);
console
.
log
(
res
,
"res"
);
this
.
captchaPath
=
window
.
URL
.
createObjectURL
(
res
.
body
);
});
},
async
handleSearch
()
{
this
.
searchCodeShow
=
this
.
search
.
code
;
this
.
showResult
=
true
;
const
params
=
{...
this
.
search
};
const
searchGlnRes
=
await
this
.
$api
.
search
.
searchGln
(
params
);
const
params
=
{
...
this
.
search
};
const
searchGlnRes
=
await
this
.
$api
.
search
.
searchGln
(
params
);
const
{
returnCode
,
data
}
=
searchGlnRes
;
console
.
log
(
searchGlnRes
,
'searchGlnRes'
);
if
(
returnCode
===
"0"
)
{
this
.
result
=
data
;
this
.
result
=
[
data
]
;
}
else
{
this
.
errorMsg
=
searchGlnRes
.
returnMsg
||
"您输入的商品条码格式不正确,请确认后重试。"
;
this
.
result
=
null
;
}
},
...
...
src/views/Search/internal.vue
View file @
7fa690ac
...
...
@@ -4,48 +4,64 @@
<div
class=
"body"
>
<el-tabs
v-model=
"activeName"
class=
"tab-no-bottom"
>
<el-tab-pane
label=
"查询厂商信息"
name=
"first"
>
<div
style=
"padding-top:20px"
>
<div
style=
"padding-top:
20px"
>
<el-radio-group
v-model=
"company"
>
<el-radio
:label=
"CODE"
>
根据厂商识别代码查询
</el-radio>
<el-radio
:label=
"NAME"
>
根据厂商名称查询
</el-radio>
<el-radio
:label=
"ADDRESS"
>
根据厂商
名称
查询
</el-radio>
<el-radio
:label=
"ADDRESS"
>
根据厂商
地址
查询
</el-radio>
</el-radio-group>
<el-form
label-position=
"left"
label-width=
"180px"
style=
"margin-top:
40px"
:model=
"companySearch"
label-position=
"left"
label-width=
"180px"
style=
"margin-top:
40px"
:model=
"companySearch"
>
<el-form-item
label=
"境内商品条码信息查询:"
>
<el-input
v-show=
"company === CODE"
v-model=
"companySearch.code"
placeholder=
"请输入正确的厂商识别代码!"
class=
"w240"
v-show=
"company === CODE"
v-model=
"companySearch.code"
placeholder=
"请输入正确的厂商识别代码!"
class=
"w240"
></el-input>
<el-input
v-show=
"company === NAME"
v-model=
"companySearch.name"
placeholder=
"请输入正确的商品条码!"
class=
"w240"
v-show=
"company === NAME"
v-model=
"companySearch.name"
placeholder=
"请输入正确的商品条码!"
class=
"w240"
></el-input>
<el-input
v-show=
"company === ADDRESS"
v-model=
"companySearch.address"
placeholder=
"请输入正确的商品条码
!"
class=
"w240"
v-show=
"company === ADDRESS"
v-model=
"companySearch.address"
placeholder=
"请输入正确的厂商名称
!"
class=
"w240"
></el-input>
</el-form-item>
<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=
"handleVerification"
v-if=
"!isVerificationPass"
>
点击此处进行验证
</el-button>
<el-button
style=
"margin-left:40px"
type=
"primary"
@
click=
"handleSearchCompany"
>
查询
</el-button
<el-button
type=
"success"
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>
</div>
...
...
@@ -53,72 +69,78 @@
<el-tab-pane
label=
"查询产品信息"
name=
"second"
>
<el-form
label-position=
"left"
label-width=
"180px"
style=
"margin-top:
20px"
:model=
"productSearch"
label-position=
"left"
label-width=
"180px"
style=
"margin-top:
20px"
:model=
"productSearch"
>
<el-form-item
label=
"境内商品条码信息查询:"
>
<el-input
v-model=
"productSearch.code"
placeholder=
"请输入13位或14位的商品条码"
class=
"w240"
v-model=
"productSearch.code"
placeholder=
"请输入13位或14位的商品条码"
class=
"w240"
></el-input>
</el-form-item>
<el-form-item
label=
"验证码:"
>
<el-button
type=
"primary"
class=
"w240"
>
<div
style=
"diplay:
flex;align-item:
center"
>
<img
style=
"height:
14px"
src=
"./img/guard.png"
alt=
""
/>
<div
style=
"diplay:
flex; align-item:
center"
>
<img
style=
"height:
14px"
src=
"./img/guard.png"
alt=
""
/>
点击此处进行验证
</div>
</el-button>
<el-button
style=
"margin-left:40px"
type=
"primary"
@
click=
"handleSearchProduct"
>
查询
</el-button
>
<el-button
style=
"margin-left: 40px"
type=
"primary"
@
click=
"handleSearchProduct"
>
查询
</el-button>
</el-form-item>
</el-form>
</el-tab-pane>
</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-body"
>
<template
v-if=
"result"
>
<!--结果表格-->
<el-table
:data=
"result"
header-cell-class-name=
"search-table-hc"
style=
"width: 100%"
>
<el-table-column
prop=
"id"
label=
"厂商识别代码"
width=
"180"
>
:data=
"result"
header-cell-class-name=
"search-table-hc"
style=
"width: 100%"
>
<el-table-column
prop=
"id"
label=
"厂商识别代码"
width=
"180"
>
<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
>
</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
prop=
"status"
label=
"状态"
>
</el-table-column>
<el-table-column
label=
"详细"
>
<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>
<span
type=
"text"
class=
"hover pointer"
@
click=
"handleCheck()"
size=
"small"
>
详情
</span
>
</
template
>
</el-table-column>
<el-table-column
label=
"查看"
>
<el-table-column
label=
"查看"
>
<
template
>
<span
type=
"text"
class=
"hover pointer"
@
click=
"handleCheck()"
size=
"small"
>
查看
</span>
<span
type=
"text"
class=
"hover pointer"
@
click=
"handleCheck()"
size=
"small"
>
查看
</span
>
</
template
>
</el-table-column>
</el-table>
...
...
@@ -131,16 +153,26 @@
<div
class=
"notice"
>
<div
class=
"title"
>
友情提示
</div>
<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>
1、
<a
href=
"http://www.ancc.org.cn/Knowledge/goodsGln.aspx"
target=
"_blank"
style=
"color: #5AC8FA;"
>
商品条码
</a>
1、
<a
href=
"http://www.ancc.org.cn/Knowledge/goodsGln.aspx"
target=
"_blank"
style=
"color: #5ac8fa"
>
商品条码
</a
>
(又称全球贸易项目代码GTIN)是指包含厂商识别代码在内的对零售商品、非零售商品、物流单元、位置、资产及服务进行全球惟一标识的一种代码(或称数据结构)。对贸易项目进行编码和符号表示(前缀码为690-699是境内条码),能够实现商品零售(POS)、进货、存货管理、自动补货、销售分析及其它业务运作的自动化。
<a
href=
"http://www.ancc.org.cn/Knowledge/goodsGln.aspx"
target=
"_blank"
style=
"color: #5AC8FA;"
>
了解更多 >>
</a>
<a
href=
"http://www.ancc.org.cn/Knowledge/goodsGln.aspx"
target=
"_blank"
style=
"color: #5ac8fa"
>
了解更多 >>
</a
>
</p>
<p
style=
"color: #
FF3B30;
"
>
<p
style=
"color: #
ff3b30
"
>
2、厂商信息查询结果说明:自中国物品编码中心为企业颁发《系统成员证书》当日起计,7天后,在线公布该企业的名称、厂商识别代码及证书颁发日期等信息;15天后,将公布该企业的具体注册信息。
</p>
<p
style=
"color: #
FF3B30;
"
>
<p
style=
"color: #
ff3b30
"
>
3、本查询仅适用于中华人民共和国境内注册的商品条码信息。
</p>
</div>
...
...
@@ -151,11 +183,12 @@
</template>
<
script
>
import
{
getUUID
}
from
"@/utils/utils"
;
import
Vcode
from
"vue-puzzle-vcode"
;
const
CODE
=
0
;
const
NAME
=
1
;
const
ADDRESS
=
2
;
const
CODE
=
'1'
;
const
NAME
=
'2'
;
const
ADDRESS
=
'3'
;
export
default
{
data
()
{
...
...
@@ -164,6 +197,7 @@ export default {
NAME
,
ADDRESS
,
isShowVcode
:
false
,
isVerificationPass
:
false
,
activeName
:
"first"
,
company
:
CODE
,
companySearch
:
{
...
...
@@ -175,7 +209,7 @@ export default {
code
:
""
,
},
result
:
null
,
searchCodeShow
:
''
,
searchCodeShow
:
""
,
showResult
:
false
,
};
},
...
...
@@ -184,8 +218,8 @@ export default {
},
methods
:
{
// 点击此处进行验证
hand
el
Verification
()
{
console
.
log
(
'点击此处进行验证'
);
hand
le
Verification
()
{
console
.
log
(
"点击此处进行验证"
);
this
.
isShowVcode
=
true
;
},
// 验证结束
...
...
@@ -195,40 +229,55 @@ export default {
// 通过验证后
onSuccess
()
{
this
.
isShowVcode
=
false
;
// 通过验证后,需要手动关闭模态框
console
.
log
(
"SUCCESS"
);
this
.
isVerificationPass
=
true
;
},
// 查看按钮
handleCheck
(
row
)
{
console
.
log
(
row
)
console
.
log
(
row
)
;
},
// 详情按钮
handleDetail
(
row
)
{
console
.
log
(
row
)
console
.
log
(
row
)
;
},
handleSearchCompany
()
{
async
handleSearchCompany
()
{
this
.
showResult
=
true
;
if
(
this
.
company
===
CODE
)
{
this
.
searchCodeShow
=
this
.
companySearch
.
code
;
if
(
this
.
companySearch
.
code
===
'1'
)
{
if
(
this
.
companySearch
.
code
===
"1"
)
{
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
)
{
this
.
searchCodeShow
=
this
.
companySearch
.
name
;
}
else
{
this
.
searchCodeShow
=
this
.
companySearch
.
address
;
}
const
params
=
{
type
:
this
.
company
,
uuid
:
getUUID
()
};
const
searchGlnRes
=
await
this
.
$api
.
search
.
searchGln
(
params
);
const
{
returnCode
,
data
}
=
searchGlnRes
;
if
(
returnCode
===
"0"
)
{
this
.
result
=
[
data
];
}
else
{
this
.
errorMsg
=
searchGlnRes
.
returnMsg
||
"您输入的商品条码格式不正确,请确认后重试。"
;
this
.
result
=
null
;
}
},
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
}
`
);
},
},
};
...
...
src/views/comps/pages.vue
View file @
7fa690ac
...
...
@@ -18,14 +18,14 @@
<div
class=
"pages-middle"
>
<button
class=
"pages-btn"
v-if=
"false"
>
首页
</button>
<el-pagination
:page-size=
"20"
:pager-count=
"5"
:current-page=
"pages.currentPage"
:page-size=
"pages.pageSize"
:pager-count=
"pages.pageCount"
layout=
"prev, pager, next"
:total=
"
1000
"
:total=
"
pages.total
"
background
@
current-change=
"handleCurrentChange"
>
<span>
1111
</span>
</el-pagination>
<button
class=
"pages-btn"
v-if=
"false"
>
尾页
</button>
</div>
...
...
@@ -40,14 +40,18 @@
</
template
>
<
script
>
export
default
{
props
:
[
'pages'
],
data
()
{
return
{
sizeList
:
[
10
,
20
],
pages
:
{
size
:
10
,
},
};
},
methods
:
{
// 当前页
handleCurrentChange
(
val
)
{
this
.
$emit
(
'toPagesFather'
,
val
)
},
},
};
</
script
>
<
style
lang=
"scss"
>
...
...
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