Commit 6dfa4632 by tang

feat: GLN

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