From 7ad9461d6a5c292774b5ba868c42c66ce9bd52ef Mon Sep 17 00:00:00 2001 From: mo-bai <1873032855@qq.com> Date: Sat, 30 Apr 2022 16:06:04 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/cart/index.vue | 15 +++++++++++++++ pages/paper-details/index.vue | 12 +++--------- 2 files changed, 18 insertions(+), 9 deletions(-) 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') } } })