Commit 96239652 authored by huangjie's avatar huangjie
parents 9b6a213d 21022f9e
...@@ -97,6 +97,27 @@ public class CustomerController extends BaseController { ...@@ -97,6 +97,27 @@ public class CustomerController extends BaseController {
Map<String, Object> map = opportunityRadarService.enterpriseByName(customer.getCompanyName()); Map<String, Object> map = opportunityRadarService.enterpriseByName(customer.getCompanyName());
if (!ObjectUtils.isEmpty(map.get("data"))) { if (!ObjectUtils.isEmpty(map.get("data"))) {
customer.setCompanyId(MapUtil.getInt(BeanUtil.beanToMap(map.get("data")), "jskEid")); customer.setCompanyId(MapUtil.getInt(BeanUtil.beanToMap(map.get("data")), "jskEid"));
if (ObjectUtils.isEmpty(customer.getLegalPerson())) {
customer.setLegalPerson(MapUtil.getStr(map, "legalPerson"));
}
if (ObjectUtils.isEmpty(customer.getRegisterCapital())) {
customer.setRegisterCapital(MapUtil.getStr(map, "registeredCapitalStr"));
}
if (ObjectUtils.isEmpty(customer.getProvinceId())) {
customer.setProvinceId(MapUtil.getInt(map, "provinceId"));
}
if (ObjectUtils.isEmpty(customer.getCityId())) {
customer.setCityId(MapUtil.getInt(map, "cityId"));
}
if (ObjectUtils.isEmpty(customer.getDistrictId())) {
customer.setDistrictId(MapUtil.getInt(map, "countyId"));
}
if (ObjectUtils.isEmpty(customer.getRegisterAddress())) {
customer.setRegisterAddress(MapUtil.getStr(map, "domicile"));
}
if (ObjectUtils.isEmpty(customer.getCreditCode())) {
customer.setCreditCode(MapUtil.getStr(map, "creditCode"));
}
} }
} catch (Exception e) { } catch (Exception e) {
logger.debug("获取企业id错误!error:{}", e.getMessage()); logger.debug("获取企业id错误!error:{}", e.getMessage());
......
...@@ -100,7 +100,6 @@ export default { ...@@ -100,7 +100,6 @@ export default {
} }
}, },
created() { created() {
this.handleQuery()
this.infos = this.customerInfo this.infos = this.customerInfo
this.iscompanyInfo = this.companyInfo ? this.companyInfo : {} this.iscompanyInfo = this.companyInfo ? this.companyInfo : {}
}, },
...@@ -135,6 +134,7 @@ export default { ...@@ -135,6 +134,7 @@ export default {
customerInfos(){ customerInfos(){
customerInfo(this.customerIds).then(res=>{ customerInfo(this.customerIds).then(res=>{
this.infos = res.data this.infos = res.data
this.handleQuery()
}) })
}, },
focusNowedits(e){ focusNowedits(e){
......
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
<Overseas v-if="currentPath.pathName=='overseas'" :company-id="companyId" /> <Overseas v-if="currentPath.pathName=='overseas'" :company-id="companyId" />
<Branch v-if="currentPath.pathName=='branch'" :company-id="companyId" /> <Branch v-if="currentPath.pathName=='branch'" :company-id="companyId" />
<Financial v-if="currentPath.pathName=='financial'" :company-id="companyId" /> <Financial v-if="currentPath.pathName=='financial'" :company-id="companyId" />
<!-- <Business v-if="currentPath.pathName=='business'" /> 商务信息 -->
<!-- 项目商机 --> <!-- 项目商机 -->
<Landtransaction v-if="currentPath.pathName=='landtransaction'" :company-id="companyId" /> <Landtransaction v-if="currentPath.pathName=='landtransaction'" :company-id="companyId" />
<Proposed v-if="currentPath.pathName=='proposed'" :company-id="companyId" /> <Proposed v-if="currentPath.pathName=='proposed'" :company-id="companyId" />
...@@ -205,8 +204,8 @@ export default { ...@@ -205,8 +204,8 @@ export default {
async handleQuery() { async handleQuery() {
let res = await infoHeader({companyId:this.companyId}) let res = await infoHeader({companyId:this.companyId})
if(res.code==200){ if(res.code==200){
this.companyInfo = res.data this.companyInfo = res.data || {}
if(this.companyInfo.companyName){ if(this.companyInfo && this.companyInfo.companyName){
this.$nextTick(()=>{ this.$nextTick(()=>{
document.getElementById('tagTitle').innerText = this.companyInfo.companyName document.getElementById('tagTitle').innerText = this.companyInfo.companyName
}) })
...@@ -247,6 +246,10 @@ export default { ...@@ -247,6 +246,10 @@ export default {
this.isCustomer = true this.isCustomer = true
this.isCompany = false this.isCompany = false
this.currentPath.pathName = 'business' this.currentPath.pathName = 'business'
this.companyInfo = {
companyName: this.customerInfo.companyName
}
document.getElementById('tagTitle').innerText = this.customerInfo.companyName
}) })
} }
} else { } else {
......
...@@ -31,9 +31,9 @@ ...@@ -31,9 +31,9 @@
</div> </div>
<div class="zbph-account">招标动态 <div class="zbph-account">招标动态
<div class="labels"> <div class="labels">
<div :class="{'on':datatype==3}" @click="getDT(3)">近</div> <div :class="{'on':datatype==3}" @click="getDT(3)">近7</div>
<div :class="{'on':datatype==2}" @click="getDT(2)">近三十</div> <div :class="{'on':datatype==2}" @click="getDT(2)">近30</div>
<div :class="{'on':datatype==1}" @click="getDT(1)">近</div> <div :class="{'on':datatype==1}" @click="getDT(1)">近5</div>
</div> </div>
</div> </div>
<div id="myEcharts" style="width: 100%;height:250px; margin: 0 auto;"></div> <div id="myEcharts" style="width: 100%;height:250px; margin: 0 auto;"></div>
...@@ -117,7 +117,7 @@ export default { ...@@ -117,7 +117,7 @@ export default {
methods: { methods: {
async handleBid(){ async handleBid(){
let res = await bidDataGroup({cid: this.companyId, spanId: this.datatype}) let res = await bidDataGroup({cid: this.companyId, spanId: this.datatype})
if(res.code==200){ if(res.code==200 && res.data){
let {totalCount, lastYearCount, bidAmount} = res.data let {totalCount, lastYearCount, bidAmount} = res.data
this.dataAll = {totalCount, lastYearCount, bidAmount} this.dataAll = {totalCount, lastYearCount, bidAmount}
this.dtdata=res.data.groupCount.map(item=>{ this.dtdata=res.data.groupCount.map(item=>{
......
...@@ -78,7 +78,7 @@ export default { ...@@ -78,7 +78,7 @@ export default {
methods: { methods: {
async handleQuery(){ async handleQuery(){
let res = await projectTenderDataGroup({cid: this.companyId, type: this.activeIndex}) let res = await projectTenderDataGroup({cid: this.companyId, type: this.activeIndex})
if(res.code==200 && res.data.length>0){ if(res.code==200 && res.data){
let data = res.data, totalVal = data.map(item => item.value).reduce((prev, cur) => prev + cur) let data = res.data, totalVal = data.map(item => item.value).reduce((prev, cur) => prev + cur)
this.viewData = data.map(item => { this.viewData = data.map(item => {
let it = {name:item.name, value:item.value, percent:parseFloat(Number(Number(item.value)/Number(totalVal)*100).toFixed(2))+'%'} let it = {name:item.name, value:item.value, percent:parseFloat(Number(Number(item.value)/Number(totalVal)*100).toFixed(2))+'%'}
...@@ -164,7 +164,9 @@ export default { ...@@ -164,7 +164,9 @@ export default {
}, },
watch: { watch: {
statistic(newVal, oldVal) { statistic(newVal, oldVal) {
this.handleStatistic() if(newVal){
this.handleStatistic()
}
} }
} }
} }
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
</div> </div>
<div class="company-title"> <div class="company-title">
<div class="company-name"> <div class="company-name">
{{companyInfo.companyName || ''}} {{companyInfo.companyName || '--'}}
</div> </div>
<div class="company-tag"> <div class="company-tag">
<div style="float: left;margin-top: 8px;" class="company-history" v-if="companyInfo.historyNames && companyInfo.historyNames.length>0"> <div style="float: left;margin-top: 8px;" class="company-history" v-if="companyInfo.historyNames && companyInfo.historyNames.length>0">
...@@ -306,7 +306,9 @@ export default { ...@@ -306,7 +306,9 @@ export default {
this.getClaimStatus() //获取企业认领状态 this.getClaimStatus() //获取企业认领状态
}, },
statistic(newVal, oldVal) { statistic(newVal, oldVal) {
this.handleStatistic() if(newVal){
this.handleStatistic()
}
} }
} }
} }
......
...@@ -73,7 +73,7 @@ export default { ...@@ -73,7 +73,7 @@ export default {
async handleQuery() { async handleQuery() {
let res = await bondCreditRating({cid: this.companyId}) let res = await bondCreditRating({cid: this.companyId})
if(res.code==200){ if(res.code==200){
this.operList = res.data this.operList = res.data || []
this.$nextTick(() => { this.$nextTick(() => {
this.companySwiper() this.companySwiper()
}) })
......
...@@ -195,7 +195,9 @@ export default { ...@@ -195,7 +195,9 @@ export default {
}, },
watch: { watch: {
statistic(newVal, oldVal) { statistic(newVal, oldVal) {
this.handView() if(newVal){
this.handView()
}
} }
} }
} }
......
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