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
7bf52d79
Commit
7bf52d79
authored
Dec 07, 2021
by
Tang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 缩短码查询【100%】
parent
e8f7ca36
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
59 additions
and
76 deletions
+59
-76
shortcode.vue
src/views/Search/shortcode.vue
+59
-76
No files found.
src/views/Search/shortcode.vue
View file @
7bf52d79
...
@@ -4,45 +4,9 @@
...
@@ -4,45 +4,9 @@
<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"
>
<el-form
label-position=
"left"
label-width=
"180px"
style=
"margin-top:20px"
:model=
"productSearch"
>
<el-form-item
label=
"缩短码查询:"
>
<el-input
v-model=
"productSearch.code"
placeholder=
"请输入正确的8位商品条码!"
class=
"w240"
>
</el-input>
</el-form-item>
<el-form-item
label=
"验证码:"
>
<div
class=
"y-center"
>
<el-input
v-model=
"productSearch.validate"
placeholder=
"请输入验证码"
class=
"w160"
></el-input>
<div
class=
"validate-code"
>
<img
src=
"../../assets/image/validate.jpg"
alt=
""
/>
</div>
<el-button
style=
"margin-left:40px"
type=
"primary"
@
click=
"handleSearchProduct"
>
查询
</el-button
>
</div>
</el-form-item>
</el-form>
</el-tab-pane>
<el-tab-pane
label=
"查询厂商信息"
name=
"second"
>
<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"
>
EAN/UCC-8缩短码
</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>
...
@@ -55,6 +19,12 @@
...
@@ -55,6 +19,12 @@
>
>
<el-form-item
label=
"缩短码查询:"
>
<el-form-item
label=
"缩短码查询:"
>
<el-input
<el-input
v-show=
"company === CODE"
v-model=
"companySearch.code"
placeholder=
"请输入正确的8位商品条码!"
class=
"w240"
></el-input>
<el-input
v-show=
"company === NAME"
v-show=
"company === NAME"
v-model=
"companySearch.name"
v-model=
"companySearch.name"
placeholder=
"请输入正确的厂商名称!"
placeholder=
"请输入正确的厂商名称!"
...
@@ -71,20 +41,21 @@
...
@@ -71,20 +41,21 @@
<el-form-item
label=
"验证码:"
>
<el-form-item
label=
"验证码:"
>
<div
class=
"y-center"
>
<div
class=
"y-center"
>
<el-input
<el-input
v-model=
"c
ompanySearch.validate
"
v-model=
"c
aptcha
"
placeholder=
"请输入验证码"
placeholder=
"请输入验证码"
class=
"w
16
0"
class=
"w
24
0"
></el-input>
></el-input>
<div
class=
"validate-code"
>
<div
class=
"validate-code"
>
<img
src=
"../../assets/image/validate.jpg"
alt=
""
/>
<img
:src=
"captchaPath"
@
click=
"getCaptcha()"
alt=
""
/>
</div>
</div>
<el-button
<el-button
style=
"margin-left:40px"
style=
"margin-left:40px"
type=
"primary"
type=
"primary"
@
click=
"handleSearchCompany"
@
click=
"handleSearchCompany"
>
查询
</el-button
>
查询
</el-button
>
>
</div>
</div>
</el-form-item>
</el-form-item>
...
@@ -96,19 +67,29 @@
...
@@ -96,19 +67,29 @@
<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"
>
<div
class=
"title"
>
商品信息
</div>
<el-table
<div
class=
"product-info"
></div>
:data=
"result"
<div
class=
"title"
>
企业信息
</div>
header-cell-class-name=
"search-table-hc"
<div
class=
"company-info"
></div>
style=
"width: 100%"
>
<el-table-column
prop=
"shortCode"
label=
"缩短码"
>
</el-table-column>
<el-table-column
prop=
"produceName"
label=
"商品名称"
>
</el-table-column>
<el-table-column
prop=
"brandName"
label=
"商标"
></el-table-column>
<el-table-column
prop=
"produceStyle"
label=
规格
></el-table-column>
<el-table-column
prop=
"producePack"
label=
"包装"
></el-table-column>
<el-table-column
prop=
"firmName"
label=
"厂商名称"
></el-table-column>
</el-table>
</
template
>
</
template
>
<span
v-else
>
没有符合条件的记录!
</span>
<span
style=
"color: #FF3B30"
v-else
>
{{ errorMsg }}
</span>
</div>
</div>
</div>
</div>
</div>
</div>
<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/query-short-code.png"
align=
"right"
alt=
""
/>
<img
src=
"./img/query-short-code.png"
align=
"right"
alt=
""
/>
<p>
<p>
1、缩短码是由7位商品代码和1位校验码构成的8位数字的条码,只有当标准码尺寸超过总印刷面积的25%时,才允许申报。请根据下列提示进行相关查询。
1、缩短码是由7位商品代码和1位校验码构成的8位数字的条码,只有当标准码尺寸超过总印刷面积的25%时,才允许申报。请根据下列提示进行相关查询。
</p>
</p>
...
@@ -118,11 +99,16 @@
...
@@ -118,11 +99,16 @@
</template>
</template>
<
script
>
<
script
>
import
validation
from
"@/views/Search/validation"
;
const
CODE
=
0
;
const
NAME
=
1
;
const
NAME
=
1
;
const
ADDRESS
=
2
;
const
ADDRESS
=
2
;
export
default
{
export
default
{
mixins
:
[
validation
],
data
()
{
data
()
{
return
{
return
{
CODE
,
NAME
,
NAME
,
ADDRESS
,
ADDRESS
,
activeName
:
"first"
,
activeName
:
"first"
,
...
@@ -130,46 +116,41 @@ export default {
...
@@ -130,46 +116,41 @@ export default {
companySearch
:
{
companySearch
:
{
validate
:
""
,
validate
:
""
,
code
:
""
,
code
:
""
,
name
:
""
,
address
:
""
,
address
:
""
,
},
},
productSearch
:
{
code
:
""
,
validate
:
""
},
searchCodeShow
:
""
,
searchCodeShow
:
""
,
showResult
:
false
,
showResult
:
false
,
result
:
null
,
result
:
null
,
};
};
},
},
methods
:
{
methods
:
{
handleSearchProduct
()
{
async
handleSearchCompany
()
{
this
.
searchCodeShow
=
this
.
productSearch
.
code
;
if
(
this
.
productSearch
.
code
===
"1"
)
{
this
.
result
=
{};
}
else
{
this
.
result
=
null
;
}
this
.
showResult
=
true
;
this
.
showResult
=
true
;
},
const
params
=
{
handleSearchCompany
()
{
shortCode
:
""
,
if
(
this
.
company
===
NAME
)
{
firmName
:
""
,
this
.
searchCodeShow
=
this
.
companySearch
.
code
;
registerAddress
:
""
,
if
(
this
.
companySearch
.
code
===
'1'
)
{
uuid
:
this
.
uuid
,
this
.
result
=
[
captcha
:
this
.
captcha
,
{
id
:
'6912614'
,
name
:
'北京阿里巴巴食品有限公司'
,
状态
:
"已注销"
},
};
{
id
:
'6912614'
,
name
:
'北京阿里巴巴食品有限公司'
,
状态
:
"已注销"
},
if
(
this
.
company
===
CODE
)
{
{
id
:
'6912614'
,
name
:
'北京阿里巴巴食品有限公司'
,
状态
:
"已注销"
},
params
.
shortCode
=
this
.
companySearch
.
code
;
{
id
:
'6912614'
,
name
:
'北京阿里巴巴食品有限公司'
,
状态
:
"已注销"
},
}
else
if
(
this
.
company
===
NAME
)
{
{
id
:
'6912614'
,
name
:
'北京阿里巴巴食品有限公司'
,
状态
:
"已注销"
},
params
.
firmName
=
this
.
companySearch
.
name
;
{
id
:
'6912614'
,
name
:
'北京阿里巴巴食品有限公司'
,
状态
:
"已注销"
},
{
id
:
'6912614'
,
name
:
'北京阿里巴巴食品有限公司'
,
状态
:
"已注销"
},
{
id
:
'6912614'
,
name
:
'北京阿里巴巴食品有限公司'
,
状态
:
"已注销"
},
]
}
}
else
{
}
else
{
this
.
searchCodeShow
=
this
.
companySearch
.
address
;
params
.
registerAddress
=
this
.
companySearch
.
address
;
}
const
searchGlnRes
=
await
this
.
$api
.
search
.
searchGetList
(
params
);
const
{
returnCode
,
data
}
=
searchGlnRes
;
if
(
returnCode
===
"0"
)
{
this
.
result
=
data
;
}
else
{
this
.
errorMsg
=
searchGlnRes
.
returnMsg
||
"没有符合条件的记录!"
;
this
.
result
=
null
;
}
}
this
.
showResult
=
true
;
},
},
},
},
};
};
...
@@ -182,6 +163,8 @@ export default {
...
@@ -182,6 +163,8 @@ export default {
width
:
70px
;
width
:
70px
;
height
:
40px
;
height
:
40px
;
margin-left
:
11px
;
margin-left
:
11px
;
overflow
:
hidden
;
>
img
{
>
img
{
width
:
100%
;
width
:
100%
;
height
:
100%
;
height
:
100%
;
...
...
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