Commit 28f5db39 by 李长胜

请选择产品

1 parent 6cc526c9
...@@ -203,10 +203,14 @@ export default { ...@@ -203,10 +203,14 @@ export default {
return return
} }
this.roleRootRules = false this.roleRootRules = false
if (this.$refs.productFrom.getSelectInfo().length == 0 || this.$refs.productFrom.productTab === '') { if (this.$refs.productFrom.getSelectInfo().length == 0) {
this.roleRootRules = true this.roleRootRules = true
return return
} }
if (this.$refs.productFrom.productTab === '') {
this.$message.error('请至少选择一项产品')
return
}
let accountTypes = JSON.stringify(this.$refs.productFrom.getSelectInfo()) let accountTypes = JSON.stringify(this.$refs.productFrom.getSelectInfo())
let para = { let para = {
merchantId: merchantId, merchantId: merchantId,
...@@ -226,31 +230,39 @@ export default { ...@@ -226,31 +230,39 @@ export default {
if (valid) { if (valid) {
let accountTypes = JSON.stringify(this.$refs.productFrom.getSelectInfo()) let accountTypes = JSON.stringify(this.$refs.productFrom.getSelectInfo())
this.roleRootRules = false this.roleRootRules = false
if (this.$refs.productFrom.getSelectInfo().length == 0 || this.$refs.productFrom.productTab === '') { if (this.$refs.productFrom.getSelectInfo().length == 0) {
this.roleRootRules = true this.roleRootRules = true
return return
} }
let para = { if (this.$refs.productFrom.productTab !== '') {
merchantId: merchantId, // this.$message.error('请至少选择一项产品')
roleName: roleName, // return
roleDescription: roleDesc, let para = {
delFlag, merchantId: merchantId,
requestList: accountTypes roleName: roleName,
} roleDescription: roleDesc,
if (this.pageType == 'edit') { delFlag,
para.id = this.editId requestList: accountTypes
this.updateRole(para) }
} else { if (this.pageType == 'edit') {
this.insertRole(para) para.id = this.editId
this.updateRole(para)
} else {
this.insertRole(para)
}
} }
} }
}) })
// console.log('外面', this.$refs.productFrom.getSelectInfo().length, this.$refs.productFrom.productTab) // console.log('外面', this.$refs.productFrom.getSelectInfo().length, this.$refs.productFrom.productTab)
this.roleRootRules = false this.roleRootRules = false
if (this.$refs.productFrom.getSelectInfo().length == 0 || this.$refs.productFrom.productTab === '') { if (this.$refs.productFrom.getSelectInfo().length == 0) {
this.roleRootRules = true this.roleRootRules = true
return return
} }
if (this.$refs.productFrom.productTab === '') {
this.$message.error('请至少选择一项产品')
return
}
} }
}, },
insertRole(para) { insertRole(para) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!