|
|
@ -115,6 +115,7 @@ import { go2, loginGo2, exit } from '@/utils/hook.js' |
|
|
import { fddEnterpriseStatus, fsAuditStatus, orderStatusEnum, enterpriseType } from '@/enums/index.js' |
|
|
import { fddEnterpriseStatus, fsAuditStatus, orderStatusEnum, enterpriseType } from '@/enums/index.js' |
|
|
import { getVerifyUrl, getFsCredit, getBaseInfo, getFeisuanUrl, cancelAccount } from '@/apis/commonApi.js' |
|
|
import { getVerifyUrl, getFsCredit, getBaseInfo, getFeisuanUrl, cancelAccount } from '@/apis/commonApi.js' |
|
|
import { getDeviceStatistics } from '@/apis/mineApi' |
|
|
import { getDeviceStatistics } from '@/apis/mineApi' |
|
|
|
|
|
import { getMachinList } from '@/apis/factoryApi' |
|
|
|
|
|
|
|
|
export default { |
|
|
export default { |
|
|
data() { |
|
|
data() { |
|
|
@ -160,37 +161,37 @@ export default { |
|
|
}, |
|
|
}, |
|
|
// 企业法大大实名认证 |
|
|
// 企业法大大实名认证 |
|
|
certifyCompany() { |
|
|
certifyCompany() { |
|
|
if (!this.hasCompany) { |
|
|
|
|
|
uni.showToast({ |
|
|
|
|
|
title: '您还没有企业信息,请先完善企业信息', |
|
|
|
|
|
icon: 'none' |
|
|
|
|
|
}) |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
if ( |
|
|
|
|
|
[fddEnterpriseStatus.UNCERTIFIED, fddEnterpriseStatus.CERTIFIED_ING, fddEnterpriseStatus.CERTIFIED_FAIL].includes(this.userInfo.fddEnterpriseStatus) |
|
|
|
|
|
) { |
|
|
|
|
|
getVerifyUrl({ enterpriseId: this.$store.state.companyInfo.id }).then((res) => { |
|
|
|
|
|
if (res) { |
|
|
|
|
|
console.log('res:', res) |
|
|
|
|
|
// #ifdef APP-PLUS |
|
|
|
|
|
go2('page-view', { |
|
|
|
|
|
title: '实名认证', |
|
|
|
|
|
url: encodeURIComponent(res) |
|
|
|
|
|
}) |
|
|
|
|
|
// #endif |
|
|
|
|
|
// #ifdef H5 |
|
|
|
|
|
window ? (window.location.href = res) : '' |
|
|
|
|
|
// #endif |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
if (this.userInfo.fddEnterpriseStatus === fddEnterpriseStatus.UNCERTIFIED) { |
|
|
|
|
|
uni.showToast({ |
|
|
|
|
|
title: '认证中,请稍后~', |
|
|
|
|
|
icon: 'none' |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
// if (!this.hasCompany) { |
|
|
|
|
|
// uni.showToast({ |
|
|
|
|
|
// title: '您还没有企业信息,请先完善企业信息', |
|
|
|
|
|
// icon: 'none' |
|
|
|
|
|
// }) |
|
|
|
|
|
// return |
|
|
|
|
|
// } |
|
|
|
|
|
// if ( |
|
|
|
|
|
// [fddEnterpriseStatus.UNCERTIFIED, fddEnterpriseStatus.CERTIFIED_ING, fddEnterpriseStatus.CERTIFIED_FAIL].includes(this.userInfo.fddEnterpriseStatus) |
|
|
|
|
|
// ) { |
|
|
|
|
|
// getVerifyUrl({ enterpriseId: this.$store.state.companyInfo.id }).then((res) => { |
|
|
|
|
|
// if (res) { |
|
|
|
|
|
// console.log('res:', res) |
|
|
|
|
|
// // #ifdef APP-PLUS |
|
|
|
|
|
// go2('page-view', { |
|
|
|
|
|
// title: '实名认证', |
|
|
|
|
|
// url: encodeURIComponent(res) |
|
|
|
|
|
// }) |
|
|
|
|
|
// // #endif |
|
|
|
|
|
// // #ifdef H5 |
|
|
|
|
|
// window ? (window.location.href = res) : '' |
|
|
|
|
|
// // #endif |
|
|
|
|
|
// </span><span class="err"> pan> } |
|
|
|
|
|
// }) |
|
|
|
|
|
// } |
|
|
|
|
|
// if (this.userInfo.fddEnterpriseStatus === fddEnterpriseStatus.UNCERTIFIED) { |
|
|
|
|
|
// uni.showToast({ |
|
|
|
|
|
// title: '认证中,请稍后~', |
|
|
|
|
|
// icon: 'none' |
|
|
|
|
|
// }) |
|
|
|
|
|
// } |
|
|
}, |
|
|
}, |
|
|
go2, |
|
|
go2, |
|
|
applyForFinance() { |
|
|
applyForFinance() { |
|
|
@ -223,11 +224,11 @@ export default { |
|
|
return null |
|
|
return null |
|
|
}, |
|
|
}, |
|
|
jumpEnterpriseEdit() { |
|
|
jumpEnterpriseEdit() { |
|
|
if (!this.hasCompany) { |
|
|
|
|
|
loginGo2('enterprise-info') |
|
|
|
|
|
} else { |
|
|
|
|
|
loginGo2('enterprise-info-edit') |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
// if (!this.hasCompany) { |
|
|
|
|
|
// loginGo2('enterprise-info') |
|
|
|
|
|
// } else { |
|
|
|
|
|
// loginGo2('enterprise-info-edit') |
|
|
|
|
|
// } |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
computed: { |
|
|
computed: { |
|
|
@ -261,7 +262,7 @@ export default { |
|
|
this.hasCompany = true |
|
|
this.hasCompany = true |
|
|
this.userInfo = { |
|
|
this.userInfo = { |
|
|
avatar: this.$store.state.userInfo.avatar || '', |
|
|
avatar: this.$store.state.userInfo.avatar || '', |
|
|
name: this.$store.state.userInfo.name || this.$store.state.userInfo.mobile || '', |
|
|
|
|
|
|
|
|
name: this.$store.state.userInfo.realName || this.$store.state.userInfo.mobile || '', |
|
|
companyName, |
|
|
companyName, |
|
|
fddEnterpriseStatus: this.$store.state.companyInfo.fddEnterpriseStatus || 1 |
|
|
fddEnterpriseStatus: this.$store.state.companyInfo.fddEnterpriseStatus || 1 |
|
|
} |
|
|
} |
|
|
@ -273,9 +274,17 @@ export default { |
|
|
this.fsInfo = res |
|
|
this.fsInfo = res |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
getDeviceStatistics().then((res) => { |
|
|
|
|
|
if (res) { |
|
|
|
|
|
this.deviceInfo = res |
|
|
|
|
|
|
|
|
getMachinList({ factoryId: this.factoryId, pageSize: 1000 }).then((res) => { |
|
|
|
|
|
if (res && res.records) { |
|
|
|
|
|
var deviceInfo = { totalNum: 0, workingNum: 0, freeNum: 0 } |
|
|
|
|
|
for (let i = 0; i < res.records.length; i++) { |
|
|
|
|
|
if(res.records[i].workingStatus == 1){ |
|
|
|
|
|
deviceInfo.workingNum ++ |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
deviceInfo.totalNum = res.records.length |
|
|
|
|
|
deviceInfo.freeNum = res.records.length - deviceInfo.workingNum |
|
|
|
|
|
this.deviceInfo = deviceInfo |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
|