|
|
|
@ -19,7 +19,7 @@ |
|
|
|
<image v-if="userInfo.fddEnterpriseStatus === fddStatus.CERTIFIED_SUCCESS" class="image" src="/static/imgs/mine/certified-icon.png"></image> |
|
|
|
<image v-else class="image" @click="certifyCompany()" src="/static/imgs/mine/non-certified-icon.png"></image> |
|
|
|
</view> |
|
|
|
<view style="margin-top: 16rpx; width: 380rpx"> |
|
|
|
<view style="margin-top: 16rpx; width: 450rpx"> |
|
|
|
<text style="font-size: 26rpx; color: #fff; font-weight: 400; word-break: break-all" @click="jumpEnterpriseEdit"> |
|
|
|
{{ hasCompany ? userInfo.companyName : '点击完善企业信息' }} |
|
|
|
</text> |
|
|
|
@ -131,6 +131,7 @@ export default { |
|
|
|
workingNum: 0, |
|
|
|
freeNum: 0 |
|
|
|
}, |
|
|
|
hasLogin: false, |
|
|
|
fsAuditStatus: Object.freeze(fsAuditStatus), |
|
|
|
orderStatusEnum: Object.freeze(orderStatusEnum) |
|
|
|
} |
|
|
|
@ -207,13 +208,25 @@ export default { |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
findOrgByFactoryId(factoryId){ |
|
|
|
var organizationList = this.$store.state.userInfo.organizationList |
|
|
|
for (var i = 0; i < organizationList.length; i++) { |
|
|
|
if(!organizationList[i].factoryList || !organizationList[i].factoryList.length){ |
|
|
|
continue |
|
|
|
} |
|
|
|
for (var k = 0; k < organizationList[i].factoryList.length; k++) { |
|
|
|
if(organizationList[i].factoryList[k].id == factoryId){ |
|
|
|
return organizationList[i] |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
return null |
|
|
|
}, |
|
|
|
jumpEnterpriseEdit() { |
|
|
|
if (!this.hasCompany) { |
|
|
|
loginGo2('enterprise-info') |
|
|
|
} else { |
|
|
|
if (this.$store.state.companyInfo.enterpriseType === enterpriseType.PRINT_PACKAGE_FACTORY) { |
|
|
|
loginGo2('enterprise-info-edit') |
|
|
|
} |
|
|
|
loginGo2('enterprise-info-edit') |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
@ -227,9 +240,6 @@ export default { |
|
|
|
isVip() { |
|
|
|
return this.$store.state.companyInfo.isVip |
|
|
|
}, |
|
|
|
hasLogin() { |
|
|
|
return this.$store.state.qnToken != '' |
|
|
|
}, |
|
|
|
curAvatar() { |
|
|
|
if (!this.hasLogin) { |
|
|
|
return '/static/imgs/mine/user-avatar.png' |
|
|
|
@ -239,36 +249,36 @@ export default { |
|
|
|
} else { |
|
|
|
return '/static/imgs/mine/default-avatar.png' |
|
|
|
} |
|
|
|
}, |
|
|
|
userInfo() { |
|
|
|
return { |
|
|
|
avatar: this.$store.state.userInfo.avatar || '', |
|
|
|
name: this.$store.state.userInfo.name || this.$store.state.userInfo.mobile || '', |
|
|
|
companyName: this.$store.state.companyInfo.name || '', |
|
|
|
fddEnterpriseStatus: this.$store.state.companyInfo.fddEnterpriseStatus || 1 |
|
|
|
} |
|
|
|
}, |
|
|
|
hasCompany() { |
|
|
|
return this.$store.state.companyInfo.id != null |
|
|
|
} |
|
|
|
}, |
|
|
|
onShow() { |
|
|
|
this.hasLogin && |
|
|
|
getFsCredit({ |
|
|
|
enterpriseId: this.$store.state.companyInfo.id |
|
|
|
}).then((res) => { |
|
|
|
if (res) { |
|
|
|
this.fsInfo = res |
|
|
|
this.factoryId = uni.getStorageSync('factoryId') |
|
|
|
this.organization = this.findOrgByFactoryId(this.factoryId) |
|
|
|
var companyName = '' |
|
|
|
if(this.organization){ |
|
|
|
companyName = this.organization.organizationName |
|
|
|
this.hasLogin = true |
|
|
|
this.hasCompany = true |
|
|
|
this.userInfo = { |
|
|
|
avatar: this.$store.state.userInfo.avatar || '', |
|
|
|
name: this.$store.state.userInfo.name || this.$store.state.userInfo.mobile || '', |
|
|
|
companyName, |
|
|
|
fddEnterpriseStatus: this.$store.state.companyInfo.fddEnterpriseStatus || 1 |
|
|
|
} |
|
|
|
}) |
|
|
|
this.hasLogin && getBaseInfo({}, true) |
|
|
|
!this.hasLogin && (this.fsInfo.status = -1) |
|
|
|
this.hasCompany && |
|
|
|
getDeviceStatistics().then((res) => { |
|
|
|
if (res) { |
|
|
|
this.deviceInfo = res |
|
|
|
} |
|
|
|
}) |
|
|
|
|
|
|
|
getFsCredit({ |
|
|
|
enterpriseId: this.organization.enterpriseId |
|
|
|
}).then((res) => { |
|
|
|
if (res) { |
|
|
|
this.fsInfo = res |
|
|
|
} |
|
|
|
}) |
|
|
|
getDeviceStatistics().then((res) => { |
|
|
|
if (res) { |
|
|
|
this.deviceInfo = res |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
|
|