Browse Source

校验

devlop
mo-bai 3 years ago
parent
commit
7ad9461d6a
2 changed files with 18 additions and 9 deletions
  1. 15
      pages/cart/index.vue
  2. 12
      pages/paper-details/index.vue

15
pages/cart/index.vue

@ -155,6 +155,9 @@ export default {
}) })
} }
return round(num, 2) return round(num, 2)
},
hasCompany() {
return this.$store.state.userInfo.companyId
} }
}, },
methods: { methods: {
@ -162,6 +165,18 @@ export default {
back, back,
// //
closeAnAccountTap() { closeAnAccountTap() {
if (!this.hasCompany) {
uni.showModal({
title: '提示',
content: '您还没有公司信息,请先完善公司信息',
success: (res) => {
if (res.confirm) {
go2('enterprise-info')
}
}
})
return
}
let orderGoodsList = [] let orderGoodsList = []
this.list.forEach((el) => { this.list.forEach((el) => {
el.carItemList.forEach((good) => { el.carItemList.forEach((good) => {

12
pages/paper-details/index.vue

@ -260,16 +260,10 @@ export default {
}, },
// //
hasComplete() { hasComplete() {
let type = this.$store.state.companyInfo.enterpriseType
//
if (type == enterpriseType.PERSONAL) {
if (this.$store.state.companyInfo.id) {
return true return true
} }
//
if (type == enterpriseType.PRINT_PACKAGE_FACTORY) {
return this.companyInfo.legalPersonIdCardNo ? true : false
}
return true
return false
}, },
hasLogin() { hasLogin() {
return this.$store.state.qnToken != '' return this.$store.state.qnToken != ''
@ -361,7 +355,7 @@ export default {
content: '请先完善公司信息', content: '请先完善公司信息',
success: (res) => { success: (res) => {
if (res.confirm) { if (res.confirm) {
go2('enterprise-info-edit')
go2('enterprise-info')
} }
} }
}) })

Loading…
Cancel
Save