Commit 6dfa4632 by tang

feat: GLN

parent 51588904
......@@ -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>{{ errorMsg }}</span>
<span style="color: rgb(255, 59, 48)" v-else>{{ errorMsg }}</span>
</div>
</div>
</div>
......@@ -114,7 +121,7 @@ export default {
const searchGlnRes = await this.$api.search.searchGln(params);
const { returnCode, data } = searchGlnRes;
if (returnCode === "0") {
this.result = data;
this.result = [data];
} else {
this.errorMsg =
searchGlnRes.returnMsg ||
......
......@@ -43,7 +43,7 @@
type="primary"
class="w240"
icon="gs-guard-icon"
@click="handelVerification"
@click="handleVerification"
v-if="!isVerificationPass"
>
点击此处进行验证
......@@ -183,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() {
......@@ -217,7 +218,7 @@ export default {
},
methods: {
// 点击此处进行验证
handelVerification() {
handleVerification() {
console.log("点击此处进行验证");
this.isShowVcode = true;
},
......@@ -239,7 +240,7 @@ export default {
handleDetail(row) {
console.log(row);
},
handleSearchCompany() {
async handleSearchCompany() {
this.showResult = true;
if (this.company === CODE) {
this.searchCodeShow = this.companySearch.code;
......@@ -260,6 +261,17 @@ export default {
} 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() {
......
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