|
@@ -8,7 +8,7 @@
|
|
|
</div>
|
|
</div>
|
|
|
<div class="search">
|
|
<div class="search">
|
|
|
<div class="input-group">
|
|
<div class="input-group">
|
|
|
- <input type="search" class="form-control" title="code" placeholder="名称/地址/行业/型号/品牌"
|
|
|
|
|
|
|
+ <input type="search" class="form-control" title="code" placeholder="名称/地址/行业"
|
|
|
v-model="searchCode" @keyup.13="goodsSearch(searchCode)" @search="goodsSearch(searchCode)"/>
|
|
v-model="searchCode" @keyup.13="goodsSearch(searchCode)" @search="goodsSearch(searchCode)"/>
|
|
|
<span class="input-group-btn">
|
|
<span class="input-group-btn">
|
|
|
<button type="button" class="btn" @click="goodsSearch(searchCode)"> 查 询</button>
|
|
<button type="button" class="btn" @click="goodsSearch(searchCode)"> 查 询</button>
|
|
@@ -26,10 +26,10 @@
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
<ul class="list-inline">
|
|
<ul class="list-inline">
|
|
|
- <li v-for="item in list.content" @click="jumpResource(item.enUU, item.hasProduct)">
|
|
|
|
|
|
|
+ <li v-for="item in list.content" @click="jumpResource(item.enUU)">
|
|
|
<div class="has_shop" v-if="item.isStore === 1">已开店</div>
|
|
<div class="has_shop" v-if="item.isStore === 1">已开店</div>
|
|
|
<div class="enterprise_name" v-text="item.enName">深圳英优软科技有限公司</div>
|
|
<div class="enterprise_name" v-text="item.enName">深圳英优软科技有限公司</div>
|
|
|
- <div class="select_btn" v-html="isInFrame ? '添加为<br/>供应商' : '查看<br/>更多'" @mouseleave="hasJump = false" @mouseenter="hasJump = true" @click="addResource(item.enUU, item.hasProduct)"></div>
|
|
|
|
|
|
|
+ <div class="select_btn" v-html="isInFrame ? '添加为<br/>供应商' : '查看<br/>更多'" @mouseleave="hasJump = false" @mouseenter="hasJump = true" @click="addResource(item.enUU)"></div>
|
|
|
<div class="popups">
|
|
<div class="popups">
|
|
|
<p>企业执照号:</p><p v-text="item.enBusinesscode ? item.enBusinesscode : '暂无信息'">1</p>
|
|
<p>企业执照号:</p><p v-text="item.enBusinesscode ? item.enBusinesscode : '暂无信息'">1</p>
|
|
|
<p>地址:</p><p v-text="item.enAddress ? item.enAddress : '暂无信息'">1</p>
|
|
<p>地址:</p><p v-text="item.enAddress ? item.enAddress : '暂无信息'">1</p>
|
|
@@ -88,7 +88,7 @@
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
- addResource (id, type) {
|
|
|
|
|
|
|
+ addResource (id) {
|
|
|
if (this.isInFrame) {
|
|
if (this.isInFrame) {
|
|
|
this.$http.get(`/basic/enterprise /${id}/info`)
|
|
this.$http.get(`/basic/enterprise /${id}/info`)
|
|
|
.then(res => {
|
|
.then(res => {
|
|
@@ -100,22 +100,27 @@
|
|
|
console.log(err)
|
|
console.log(err)
|
|
|
})
|
|
})
|
|
|
} else {
|
|
} else {
|
|
|
- if (type === 1) {
|
|
|
|
|
- this.$router.push('supplier/' + id)
|
|
|
|
|
- } else {
|
|
|
|
|
- this.hasDialog = true
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ this.isVaildSupplier(id)
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- jumpResource (id, type) {
|
|
|
|
|
|
|
+ jumpResource (id) {
|
|
|
if (!this.hasJump) {
|
|
if (!this.hasJump) {
|
|
|
- if (type === 1) {
|
|
|
|
|
- this.$router.push('supplier/' + id)
|
|
|
|
|
- } else {
|
|
|
|
|
- this.hasDialog = true
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ this.isVaildSupplier(id)
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
|
|
+ // 判断是否有有效物料信息
|
|
|
|
|
+ isVaildSupplier (id) {
|
|
|
|
|
+ this.$http.get('vendor/introduction/product/count', {params: {vendUU: id}})
|
|
|
|
|
+ .then(res => {
|
|
|
|
|
+ if (res.data.count !== 0) {
|
|
|
|
|
+ this.$router.push('supplier/' + id)
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.hasDialog = true
|
|
|
|
|
+ }
|
|
|
|
|
+ }, err => {
|
|
|
|
|
+ console.log(err)
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
goodsSearch (type) {
|
|
goodsSearch (type) {
|
|
|
this.pageParams.page = 1
|
|
this.pageParams.page = 1
|
|
|
this.$store.dispatch('supplier/loadVendorList', {page: this.pageParams.page, size: this.pageParams.count, keyword: type})
|
|
this.$store.dispatch('supplier/loadVendorList', {page: this.pageParams.page, size: this.pageParams.count, keyword: type})
|