|
|
@@ -471,8 +471,23 @@
|
|
|
window.location.href = '/seek/release/template'
|
|
|
},
|
|
|
setCode: function (code) {
|
|
|
- this.applyObj.code = code
|
|
|
- this.showSimilarCodeList = false
|
|
|
+ this.$http.get('/search/201819', {params: {page: 1, count: 1, type: 'component', keyword: code}})
|
|
|
+ .then(res => {
|
|
|
+ if (res.data && res.data.futures && res.data.futures.content) {
|
|
|
+ let obj = res.data.futures.content[0]
|
|
|
+ if (obj) {
|
|
|
+ this.applyObj.brand = obj.pbrand || obj.pbranden || ''
|
|
|
+ this.applyObj.prodTitle = obj.kind || obj.kinden || ''
|
|
|
+ this.applyObj.spec = obj.spec || ''
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.applyObj.code = code
|
|
|
+ this.showSimilarCodeList = false
|
|
|
+ }, err => {
|
|
|
+ this.applyObj.code = code
|
|
|
+ this.showSimilarCodeList = false
|
|
|
+ console.log(err.response.data || err)
|
|
|
+ })
|
|
|
},
|
|
|
setBrand: function (brand) {
|
|
|
this.applyObj.brand = brand
|