diff --git a/pages/cart/index.vue b/pages/cart/index.vue index 44dd7e4..4257380 100644 --- a/pages/cart/index.vue +++ b/pages/cart/index.vue @@ -155,6 +155,9 @@ export default { }) } return round(num, 2) + }, + hasCompany() { + return this.$store.state.userInfo.companyId } }, methods: { @@ -162,6 +165,18 @@ export default { back, // 结算 closeAnAccountTap() { + if (!this.hasCompany) { + uni.showModal({ + title: '提示', + content: '您还没有公司信息,请先完善公司信息', + success: (res) => { + if (res.confirm) { + go2('enterprise-info') + } + } + }) + return + } let orderGoodsList = [] this.list.forEach((el) => { el.carItemList.forEach((good) => { diff --git a/pages/paper-details/index.vue b/pages/paper-details/index.vue index 2397783..e3ec861 100644 --- a/pages/paper-details/index.vue +++ b/pages/paper-details/index.vue @@ -260,16 +260,10 @@ export default { }, // 工厂是否完善企业信息 hasComplete() { - let type = this.$store.state.companyInfo.enterpriseType - // 个人用户 - if (type == enterpriseType.PERSONAL) { + if (this.$store.state.companyInfo.id) { return true } - // 工厂用户 - if (type == enterpriseType.PRINT_PACKAGE_FACTORY) { - return this.companyInfo.legalPersonIdCardNo ? true : false - } - return true + return false }, hasLogin() { return this.$store.state.qnToken != '' @@ -361,7 +355,7 @@ export default { content: '请先完善公司信息', success: (res) => { if (res.confirm) { - go2('enterprise-info-edit') + go2('enterprise-info') } } })