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
c593ed75
Commit
c593ed75
authored
Jan 06, 2022
by
tang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 境内码商品信息查询
parent
d8b8e4f1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
9 deletions
+34
-9
search.js
src/axios/module/search.js
+1
-1
internal.vue
src/views/Search/internal.vue
+33
-8
No files found.
src/axios/module/search.js
View file @
c593ed75
...
...
@@ -21,7 +21,7 @@ const searchInternal = (params = {}) => {
// 条码查询-境内码商品信息
const
searchInternalProduct
=
(
params
=
{})
=>
{
return
POST
(
`
${
Prefix
}
/office/
production/api/search
`
,
params
)
return
POST
(
`
${
Prefix
}
/office/
codeSearch/api/domesticCodeProductionNews
`
,
params
)
}
// 条码查询—查询商品变更记录
...
...
src/views/Search/internal.vue
View file @
c593ed75
...
...
@@ -365,11 +365,12 @@ export default {
this
.
detailDialogVisible
=
true
}
},
// 查看变更详情
async
handleCheckChange
(
row
)
{
console
.
log
(
row
);
const
searchGlnRes
=
await
this
.
$api
.
search
.
searchCompanyChange
({
code
:
row
.
code
});
console
.
log
(
searchGlnRes
)
console
.
log
(
searchGlnRes
)
;
const
{
data
}
=
searchGlnRes
;
if
(
searchGlnRes
.
success
)
{
console
.
log
(
data
)
...
...
@@ -383,6 +384,7 @@ export default {
alert
(
searchGlnRes
.
returnMsg
||
'网络错误,请稍后再试'
)
}
},
async
handleSearchCompany
()
{
this
.
showResult
=
true
;
this
.
resultType
=
'company'
...
...
@@ -412,13 +414,36 @@ export default {
},
async
handleSearchProduct
()
{
const
a
=
document
.
createElement
(
'a'
)
a
.
setAttribute
(
'href'
,
`/internal_code_search/searchResult2.aspx?keyword=
${
this
.
productSearch
.
code
}
`
)
// a.setAttribute('target', '_blank')
a
.
setAttribute
(
'id'
,
'cow-link-temp'
)
document
.
body
.
appendChild
(
a
)
a
.
click
()
document
.
body
.
removeChild
(
document
.
getElementById
(
'cow-link-temp'
))
if
(
!
this
.
isVerificationPass
)
{
return
this
.
$message
.
error
(
'请先进行验证'
);
}
if
(
!
this
.
productSearch
.
code
)
{
return
this
.
$message
.
error
(
'请输入商品条码'
);
}
this
.
showResult
=
true
;
this
.
resultType
=
'product'
;
const
params
=
{
code
:
this
.
productSearch
.
code
};
const
searchGlnRes
=
await
this
.
$api
.
search
.
searchInternalProduct
(
params
);
if
(
searchGlnRes
.
returnCode
===
"0"
)
{
const
a
=
document
.
createElement
(
'a'
)
a
.
setAttribute
(
'href'
,
searchGlnRes
.
data
)
// a.setAttribute('target', '_blank')
a
.
setAttribute
(
'id'
,
'cow-link-temp'
)
document
.
body
.
appendChild
(
a
)
a
.
click
()
}
else
{
this
.
errorMsg
=
searchGlnRes
.
returnMsg
||
"没有符合条件的记录!"
;
this
.
result
=
null
;
}
// const a = document.createElement('a')
// a.setAttribute('href', `/internal_code_search/searchResult2.aspx?keyword=${this.productSearch.code}`)
// // a.setAttribute('target', '_blank')
// a.setAttribute('id', 'cow-link-temp')
// document.body.appendChild(a)
// a.click()
// document.body.removeChild(document.getElementById('cow-link-temp'))
// window.open(`http://search.anccnet.com/searchResult2.aspx?keyword=${this.productSearch.code}`, '_blank')
}
...
...
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