Commit f2ef9dba by Lyan

条码查询

parent 6799218b
...@@ -6,7 +6,8 @@ const Prefix = process.env.NODE_ENV === 'development' ? '/gs1' : ''; ...@@ -6,7 +6,8 @@ const Prefix = process.env.NODE_ENV === 'development' ? '/gs1' : '';
// 条码查询—GLN查询/境外码查询 // 条码查询—GLN查询/境外码查询
const searchGln = (params = {}) => { const searchGln = (params = {}) => {
return POST(`${Prefix}/office/codeSearch/api/gln`, params) // return POST(`${Prefix}/office/codeSearch/api/gln`, params)
return POST(`${Prefix}/office/gTinSearch/api/gtin`, params)
} }
// 条码查询—缩短码查询 // 条码查询—缩短码查询
...@@ -14,6 +15,7 @@ const searchGetList = (params = {}) => { ...@@ -14,6 +15,7 @@ const searchGetList = (params = {}) => {
return POST(`${Prefix}/office/shortcode/api/getList`, params) return POST(`${Prefix}/office/shortcode/api/getList`, params)
} }
// 条码查询—境内码查询 // 条码查询—境内码查询
const searchInternal = (params = {}) => { const searchInternal = (params = {}) => {
return POST(`${Prefix}/office/codeSearch/api/domesticCode`, params) return POST(`${Prefix}/office/codeSearch/api/domesticCode`, params)
...@@ -21,7 +23,7 @@ const searchInternal = (params = {}) => { ...@@ -21,7 +23,7 @@ const searchInternal = (params = {}) => {
// 条码查询-境内码商品信息 // 条码查询-境内码商品信息
const searchInternalProduct = (params = {}) => { const searchInternalProduct = (params = {}) => {
return POST(`${Prefix}/office/codeSearch/api/domesticCodeProductionNews`, params) return POST(`${Prefix}/office/gTinSearch/api/domesticCodeProductionNews`, params)
} }
// 条码查询—查询商品变更记录 // 条码查询—查询商品变更记录
......
...@@ -55,7 +55,7 @@ export default { ...@@ -55,7 +55,7 @@ export default {
}, },
methods: { methods: {
handleToLogin() { handleToLogin() {
window.open('https://www.gds.org.cn/#/home/index','_blank') window.open('https://passport.gds.org.cn/Account/Login?ReturnUrl=%2Fconnect%2Fauthorize%2Fcallback%3Fclient_id%3Dvuejs_code_client%26redirect_uri%3Dhttps%253A%252F%252Fwww.gds.org.cn%252F%2523%252Fcallback%26response_type%3Dcode%26scope%3Dopenid%2520profile%2520api1%2520offline_access%26state%3Dcb6c003f5b8346ada430f122b373f5b6%26code_challenge%3Dgl_jGlP1gFP5jXBdIIhKFGlYd9fiFXQ-eW4O3HnbX6M%26code_challenge_method%3DS256%26response_mode%3Dquery','_blank')
}, },
goTraining(){ goTraining(){
this.$router.push({ this.$router.push({
......
<template> <template>
<div class="gs_admin_check"> <div class="gs_admin_check">
<div class="dashboard" v-show="!query.status"> <!-- <div class="dashboard" v-show="!query.status">
<div class="card_wrapper"> <div class="card_wrapper">
<div class="title">企业实名认证</div> <div class="title">企业实名认证</div>
<div class="body clearfix"> <div class="body clearfix">
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
</div> </div>
</div> </div>
</div> </div>
<CheckSearchTable v-if="query.status" :query="query" @refresh="getTotalCount"></CheckSearchTable> <CheckSearchTable v-if="query.status" :query="query" @refresh="getTotalCount"></CheckSearchTable> -->
</div> </div>
</template> </template>
......
...@@ -52,7 +52,8 @@ export default { ...@@ -52,7 +52,8 @@ export default {
id: uuid("gs_nav"), id: uuid("gs_nav"),
name: "厂商实名认证", name: "厂商实名认证",
index: 1, index: 1,
link: "/MyManage/UnVerify/vendor", // link: "/MyManage/UnVerify/vendor",
link:'https://www.gds.org.cn/#/enterpriseAuth/index',
}, },
// { // 一期先不上线,暂时把该菜单项进行隐藏(包括个人中心首页的检测校准申请相关内容) // { // 一期先不上线,暂时把该菜单项进行隐藏(包括个人中心首页的检测校准申请相关内容)
// id: uuid("gs_nav"), // id: uuid("gs_nav"),
...@@ -146,16 +147,17 @@ export default { ...@@ -146,16 +147,17 @@ export default {
index: 3, index: 3,
link: "/MyManage/UnVerify/changePhone", link: "/MyManage/UnVerify/changePhone",
}, },
{ // {
id: uuid("gs_nav"), // id: uuid("gs_nav"),
name: "变更企业信息", // name: "变更企业信息",
index: 4, // index: 4,
link: "/MyManage/UnVerify/vendor", // link: "/MyManage/UnVerify/vendor",
}, // },
], ],
}, },
], ],
adminRouterList: [ adminRouterList:[],//暂时屏蔽管理员审核
adminRouterList2: [
{ {
id: uuid("gs_nav"), id: uuid("gs_nav"),
name: "业务审核", name: "业务审核",
...@@ -187,7 +189,8 @@ export default { ...@@ -187,7 +189,8 @@ export default {
link: "/MyManage/admin/log", link: "/MyManage/admin/log",
}, },
], ],
adminBranchRouterList: [ adminBranchRouterList:[],//暂时屏蔽管理员审核
adminBranchRouterList2: [
{ {
id: uuid("gs_nav"), id: uuid("gs_nav"),
name: "实名认证业务审核", name: "实名认证业务审核",
......
...@@ -111,7 +111,7 @@ export default { ...@@ -111,7 +111,7 @@ export default {
if(this.hasSpecialString(this.searchCodeShow)){ if(this.hasSpecialString(this.searchCodeShow)){
return true return true
} }
this.showResult = true;
const params = { const params = {
"code": this.search.code, "code": this.search.code,
"type": "GTIN", "type": "GTIN",
...@@ -120,18 +120,19 @@ export default { ...@@ -120,18 +120,19 @@ export default {
"uuid": this.uuid "uuid": this.uuid
}; };
const searchGlnRes = await this.$api.search.searchGln(params); const searchGlnRes = await this.$api.search.searchGln(params);
const {returnCode, data} = searchGlnRes; const {returnCode} = searchGlnRes;
console.log(searchGlnRes)
if (returnCode === "0") { if (returnCode === "0") {
if (data.returnCode === '0' || data.returnCode === '3') { let redirectUrl='https://www.gds.org.cn/#/importList/index?type=importProduct&keyword='+this.search.code
this.result = [data]; window.open(redirectUrl, '_blank')
} else {
this.errorMsg = errorText[data.returnCode] || "数据查询异常!";
}
} else { } else {
this.showResult = true;
this.errorMsg = this.errorMsg =
searchGlnRes.returnMsg || searchGlnRes.returnMsg ||
"您输入的商品条码格式不正确,请确认后重试。"; "您输入的商品条码格式不正确,请确认后重试。";
this.result = null; // this.result = null;
} }
this.getCaptcha(); this.getCaptcha();
}, },
......
...@@ -78,18 +78,23 @@ ...@@ -78,18 +78,23 @@
</el-form-item> </el-form-item>
<el-form-item label="验证码:"> <el-form-item label="验证码:">
<el-button type="primary" class="w240" @click="handleVerification"> <div class="y-center">
<div style="diplay: flex; align-item: center"> <el-input
<img style="height: 14px" src="./img/guard.png" alt=""/> v-model="productSearch.captcha"
点击此处进行验证 placeholder="请输入验证码"
class="w160"
></el-input>
<div class="validate-code">
<img :src="captchaPath" @click="getCaptcha()" alt=""/>
</div> </div>
</el-button>
<el-button <el-button
style="margin-left: 40px" style="margin-left: 40px"
type="primary" type="primary"
@click="handleSearchProduct" @click="handleSearchProduct"
>查询 >查询
</el-button> </el-button>
</div>
</el-form-item> </el-form-item>
</el-form> </el-form>
</el-tab-pane> </el-tab-pane>
...@@ -296,6 +301,7 @@ export default { ...@@ -296,6 +301,7 @@ export default {
}, },
productSearch: { productSearch: {
code: "", code: "",
captcha:''
}, },
result: null, result: null,
resultType: 'company', resultType: 'company',
...@@ -419,9 +425,7 @@ export default { ...@@ -419,9 +425,7 @@ export default {
}, },
async handleSearchProduct() { async handleSearchProduct() {
if (!this.isVerificationPass) {
return this.$message.error('请先进行验证');
}
if (!this.productSearch.code) { if (!this.productSearch.code) {
return this.$message.error('请输入商品条码'); return this.$message.error('请输入商品条码');
} }
...@@ -452,23 +456,26 @@ export default { ...@@ -452,23 +456,26 @@ export default {
// document.body.appendChild(a) // document.body.appendChild(a)
// a.click() // a.click()
// document.body.removeChild(document.getElementById('cow-link-temp')) // document.body.removeChild(document.getElementById('cow-link-temp'))
window.open(`https://www.gds.org.cn/#/barcodeList/index?type=barcode&keyword=${this.productSearch.code}`, '_blank')
} this.showResult = true;
this.resultType = 'product'
const paramsProduct = {uuid: this.uuid, code: this.productSearch.code, captcha: this.productSearch.captcha,};
const searchGlnResProduct = await this.$api.search.searchInternalProduct(paramsProduct);
const {returnCode} = searchGlnResProduct;
if (returnCode === "0") {
window.open(`https://www.gds.org.cn/#/barcodeList/index?type=barcode&keyword=${this.productSearch.code}`, '_blank')
} else {
this.errorMsg =
searchGlnResProduct.returnMsg ||
"没有符合条件的记录!";
this.result = null;
}
this.getCaptcha();
},
// this.showResult = true;
// this.resultType = 'product' }
// const params = {uuid: this.uuid, keyword: this.productSearch.code, captcha: this.captcha,};
// const searchGlnRes = await this.$api.search.searchInternalProduct(params);
// if (returnCode === "0") {
// this.result = [data.hits.hits];
// } else {
// this.errorMsg =
// searchGlnRes.returnMsg ||
// "没有符合条件的记录!";
// this.result = null;
// }
// },
},
}; };
</script> </script>
......
src/views/Service/img/5.jpg

81.9 KB | W: | H:

src/views/Service/img/5.jpg

186 KB | W: | H:

src/views/Service/img/5.jpg
src/views/Service/img/5.jpg
src/views/Service/img/5.jpg
src/views/Service/img/5.jpg
  • 2-up
  • Swipe
  • Onion skin
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