Commit a5951d30 by Tang

feat: 缩短码查询优化

parent 6d9ddc53
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<el-form <el-form
label-position="left" label-position="left"
label-width="180px" label-width="180px"
style="margin-top:50px" style="margin-top:40px"
:model="companySearch" :model="companySearch"
> >
<el-form-item label="境内商品条码信息查询:"> <el-form-item label="境内商品条码信息查询:">
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
<el-form <el-form
label-position="left" label-position="left"
label-width="180px" label-width="180px"
style="margin-top:50px" style="margin-top:20px"
:model="productSearch" :model="productSearch"
> >
<el-form-item label="境内商品条码信息查询:"> <el-form-item label="境内商品条码信息查询:">
......
...@@ -2,62 +2,115 @@ ...@@ -2,62 +2,115 @@
<div class="search-content"> <div class="search-content">
<div class="title">缩短码查询</div> <div class="title">缩短码查询</div>
<div class="body"> <div class="body">
<div style="padding-top:20px"> <el-tabs v-model="activeName" class="tab-no-bottom">
<el-form label-position="left" label-width="180px" :model="search"> <el-tab-pane label="查询产品信息" name="first">
<el-form-item label="境外商品条码信息查询:"> <el-form label-position="left"
<el-input label-width="180px"
v-model="search.code" style="margin-top:20px"
placeholder="请输入正确的境外商品条码!" :model="productSearch">
class="w240" <el-form-item label="缩短码查询:">
></el-input> <el-input
</el-form-item> v-model="productSearch.code"
placeholder="请输入正确的8位商品条码!"
class="w240"
>
</el-input>
</el-form-item>
<el-form-item label="验证码:"> <el-form-item label="验证码:">
<div class="y-center"> <div class="y-center">
<el-input <el-input
v-model="search.validate" v-model="productSearch.validate"
placeholder="请输入验证码" placeholder="请输入验证码"
class="w160" class="w160"
></el-input> ></el-input>
<div class="validate-code"> <div class="validate-code">
<img src="../../assets/image/validate.jpg" alt="" /> <img src="../../assets/image/validate.jpg" alt="" />
</div> </div>
<el-button <el-button
style="margin-left:40px" style="margin-left:40px"
type="primary" type="primary"
@click="handleSearch" @click="handleSearchProduct"
>查询</el-button >查询</el-button
> >
</div> </div>
</el-form-item> </el-form-item>
</el-form> </el-form>
</el-tab-pane>
<div class="result-box" v-if="showResult"> <el-tab-pane label="查询厂商信息" name="second">
<div class="result-box-title">查询 {{ searchCodeShow }} 结果</div> <div style="padding-top:20px">
<div class="result-box-body"> <el-radio-group v-model="company">
<template v-if="result"> <el-radio :label="NAME">根据厂商名称查询</el-radio>
<div class="title">商品信息</div> <el-radio :label="ADDRESS">根据厂商地址查询</el-radio>
<div class="product-info"></div> </el-radio-group>
<div class="title">企业信息</div>
<div class="company-info"></div> <el-form
</template> label-position="left"
<span v-else>您输入的商品条码格式不正确,请确认后重试。</span> label-width="180px"
style="margin-top:40px"
:model="companySearch"
>
<el-form-item label="缩短码查询:">
<el-input
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"
></el-input>
</el-form-item>
<el-form-item label="验证码:">
<div class="y-center">
<el-input
v-model="companySearch.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="handleSearchCompany"
>查询</el-button
>
</div>
</el-form-item>
</el-form>
</div> </div>
</el-tab-pane>
</el-tabs>
<div class="result-box" v-if="showResult">
<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>
</template>
<span v-else>没有符合条件的记录!</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-external-barcode.png" align="right" alt="" /> <img src="./img/query-short-code.png" align="right" alt="" />
<p>
1、目前,国际物品编码组织(GS1)已将690至697之间的前缀码分配给中国物品编码中心使用,通常以这些前缀码开始的厂商识别代码都是由中国物品编码中心负责分配和管理的;以其他前缀码开始的则由境外GS1成员组织负责,一般称为"境外条码",以下为您提供了境外商品条码信息的查询工具,请根据提示进行相关查询。欲了解GS1分配的前缀码,请点击:了解更多
>>
</p>
<p> <p>
2、本查询仅适用于中华人民共和国境外注册的商品条码信息 1、缩短码是由7位商品代码和1位校验码构成的8位数字的条码,只有当标准码尺寸超过总印刷面积的25%时,才允许申报。请根据下列提示进行相关查询
</p> </p>
</div> </div>
</div> </div>
...@@ -65,22 +118,58 @@ ...@@ -65,22 +118,58 @@
</template> </template>
<script> <script>
const NAME = 1;
const ADDRESS = 2;
export default { export default {
data() { data() {
return { return {
search: { code: "", validate: "" }, NAME,
ADDRESS,
activeName: "first",
company: NAME,
companySearch: {
validate: "",
code: "",
address: "",
},
productSearch: {
code: "",
validate: ""
},
searchCodeShow: "", searchCodeShow: "",
showResult: false, showResult: false,
result: null, result: null,
}; };
}, },
methods: { methods: {
handleSearch() { handleSearchProduct() {
this.searchCodeShow = this.search.code; this.searchCodeShow = this.productSearch.code;
this.showResult = true; if (this.productSearch.code === "1") {
if (this.search.code === "1") {
this.result = {}; this.result = {};
}else{
this.result = null;
} }
this.showResult = true;
},
handleSearchCompany() {
if (this.company === NAME) {
this.searchCodeShow = this.companySearch.code;
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: '北京阿里巴巴食品有限公司', 状态: "已注销"},
]
}
} else {
this.searchCodeShow = this.companySearch.address;
}
this.showResult = true;
}, },
}, },
}; };
......
...@@ -41,6 +41,7 @@ ...@@ -41,6 +41,7 @@
margin-top: 29px; margin-top: 29px;
font-size: 14px; font-size: 14px;
font-weight: 400; font-weight: 400;
overflow: hidden;
p + p { p + p {
margin-top: 30px; margin-top: 30px;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment