Commit a8b44aea by cwq0219

客户群体

1 parent 8f329008
......@@ -136,6 +136,7 @@
:key="subItem[item.optionId]"
:label="subItem[item.optionLabel]"
:value="subItem[item.optionId]"
:disabled="subItem.isDisabled || false"
>
</el-option>
</el-select>
......
......@@ -112,10 +112,10 @@
></own-cus-com>
</template>
<template slot="funValueTxt">
<div class="edit-tip">有属性值和属性文本示例1:1,奥迪;2,宝马;3,奔驰&nbsp;&nbsp;&nbsp;&nbsp;无属性文本示例:GT001,GT002,GT003</div>
<div class="edit-tip">有属性值和属性文本示例1:1,奥迪;2,宝马;3,奔驰</div>
</template>
<template slot="newFunValueTxt">
<div :class="{'edit-tip': editForm.id }">有属性值和属性文本示例1:1,奥迪;2,宝马;3,奔驰&nbsp;&nbsp;&nbsp;&nbsp;无属性文本示例:GT001,GT002,GT003</div>
<div :class="{'edit-tip': editForm.id }">有属性值和属性文本示例1:1,奥迪;2,宝马;3,奔驰</div>
</template>
</glsx-combi-form>
</glsx-dialog>
......@@ -254,7 +254,8 @@ export default {
menuId: '',
menuName: '',
ownedCusgroupType: '',
ownedCusgroupValue: ''
ownedCusgroupValue: '',
ownedMerchant: ''
},
editRule: {
productId: [{ required: true, message: '请选择产品名称', trigger: 'change' }],
......@@ -332,10 +333,11 @@ export default {
optionsName: 'ownCusList',
changeAttr: (value, targetItem) => {
// baseData[attrToList[form[targetItem.firstVal]]]
this.editFormData[this.editFormData.findIndex(item => item.name === 'ownedCusgroupValue')].isHide = (value === 3)
this.editFormData[this.editFormData.findIndex(item => item.name === 'ownedMerchant')].isHide = (value !== 3)
this.editForm.ownedCusgroupValue = ''
this.editFormData[this.editFormData.findIndex(item => item.name === 'ownedCusgroupValue')].isDisabled = (value === 3)
this.editForm.ownedMerchant = ''
this.editRule.ownedCusgroupValue[0].required = (value !== 3)
// this.$refs.editFormRef.$refs[this.editChildRef].validateField('ownedCusgroupValue')
if (value && (value !== 3)) {
this.baseData.cusGroupList = this.baseData[this.attrToList[value]]
this.getOptionsList('editFormData', false)
......@@ -347,7 +349,7 @@ export default {
width: '240px',
type: 'select',
multiple: true,
isDisabled: true,
// isDisabled: true,
optionList: [],
optionId: 'dictValue',
optionLabel: 'dictLabel',
......@@ -496,7 +498,8 @@ export default {
},
editDisable() {
this.editFormData[this.editFormData.findIndex(item => item.label === '产品')].isDisabled = !!this.editForm.id
this.editFormData[this.editFormData.findIndex(item => item.name === 'ownedCusgroupValue')].isDisabled = (!this.editForm.ownedCusgroupType || (this.editForm.ownedCusgroupType === 3))
this.editFormData[this.editFormData.findIndex(item => item.name === 'ownedCusgroupValue')].isHide = (!this.editForm.ownedCusgroupType || (this.editForm.ownedCusgroupType === 3))
this.editFormData[this.editFormData.findIndex(item => item.name === 'ownedMerchant')].isHide = (!this.editForm.ownedCusgroupType || (this.editForm.ownedCusgroupType !== 3))
this.editFormData[this.editFormData.findIndex(item => item.name === 'functionValue')].isDisabled = !!this.editForm.id
this.editFormData[this.editFormData.findIndex(item => item.name === 'newFunValue')].isHide = !this.editForm.id
this.editFormData[this.editFormData.findIndex(item => item.name === 'newFunValueTxt')].isHide = !this.editForm.id
......@@ -504,6 +507,7 @@ export default {
},
handleAdd() {
this.editVisible = !this.editVisible
this.editFormData[this.editFormData.findIndex(item => item.name === 'ownedCusgroupType')].isDisabled = this.editForm.id
this.editDisable()
this.$refs.editFormRef && (this.$refs.editFormRef.$refs[this.editChildRef].clearValidate())
},
......@@ -516,7 +520,10 @@ export default {
},
recoveryEdit(row) {
if (this.editForm.ownedCusgroupType && (this.editForm.ownedCusgroupType !== 3)) {
this.baseData.cusGroupList = this.baseData[this.attrToList[this.editForm.ownedCusgroupType]]
this.baseData.cusGroupList = _.cloneDeep(this.baseData[this.attrToList[this.editForm.ownedCusgroupType]])
this.baseData.cusGroupList.forEach(item => {
this.editForm.ownedCusgroupValue.includes(item.dictValue) && (item.isDisabled = true)
})
}
},
handleFunEdit(row) {
......@@ -536,7 +543,8 @@ export default {
menuId: '',
menuName: '',
ownedCusgroupType: '',
ownedCusgroupValue: ''
ownedCusgroupValue: '',
ownedMerchant: ''
}
var resetBaseNameList = ['menuTreeList', 'cusGroupList']
resetBaseNameList.forEach(item => {
......@@ -585,7 +593,7 @@ export default {
.edit-tip {
display: block;
font-size: 8px;
color: #409EFF;
color: #409eff;
margin: -14px 0 0 130px;
}
</style>
\ No newline at end of file
......@@ -326,8 +326,10 @@ export default {
optionsName: 'ownCusList',
changeAttr: (value, targetItem) => {
// baseData[attrToList[form[targetItem.firstVal]]]
this.editFormData[this.editFormData.findIndex(item => item.name === 'ownedCusgroupValue')].isHide = (value === 3)
this.editFormData[this.editFormData.findIndex(item => item.name === 'ownedMerchant')].isHide = (value !== 3)
this.editForm.ownedCusgroupValue = []
this.editFormData[this.editFormData.findIndex(item => item.name === 'ownedCusgroupValue')].isDisabled = (value === 3)
this.editForm.ownedMerchant = ''
this.editRule.ownedCusgroupValue[0].required = (value !== 3)
this.$refs.editFormRef.$refs[this.editChildRef].validateField('ownedCusgroupValue')
if (value !== 3) {
......@@ -342,7 +344,7 @@ export default {
type: 'select',
isHide: true,
multiple: true,
isDisabled: true,
// isDisabled: true,
optionList: [],
optionId: 'dictValue',
optionLabel: 'dictLabel',
......@@ -443,11 +445,16 @@ export default {
this.editForm.ownedCusgroupValue = []
this.editForm.ownedMerchant = ''
}
this.baseData.cusGroupList = isSpecial ? this.baseData[this.attrToList[this.editForm.ownedCusgroupType]] : []
this.baseData.cusGroupList = isSpecial ? _.cloneDeep(this.baseData[this.attrToList[this.editForm.ownedCusgroupType]]) : []
if (this.editForm.menuCode && isSpecial && (this.editForm.ownedCusgroupType !== 3)) {
this.baseData.cusGroupList.forEach(item => {
this.editForm.ownedCusgroupValue.includes(item.dictValue) && (item.isDisabled = true)
})
}
this.getOptionsList('editFormData', false)
this.editFormData[this.editFormData.findIndex(item => item.name === 'ownedCusgroupType')].isHide = !isSpecial
this.editFormData[this.editFormData.findIndex(item => item.name === 'ownedCusgroupValue')].isHide = !isSpecial
this.editFormData[this.editFormData.findIndex(item => item.name === 'ownedMerchant')].isHide = !isSpecial
this.editFormData[this.editFormData.findIndex(item => item.name === 'ownedCusgroupValue')].isHide = (!isSpecial || (isSpecial && this.editForm.ownedCusgroupType === 3))
this.editFormData[this.editFormData.findIndex(item => item.name === 'ownedMerchant')].isHide = (!isSpecial || (isSpecial && this.editForm.ownedCusgroupType !== 3))
this.editRule.ownedCusgroupValue[0].required = isSpecial && (this.editForm.ownedCusgroupType !== 3)
this.editRule.ownedCusgroupType[0].required = isSpecial
},
......@@ -455,10 +462,15 @@ export default {
this.editFormData[this.editFormData.findIndex(item => item.label === '产品')].isDisabled = !!this.editForm.menuCode
this.editFormData[this.editFormData.findIndex(item => item.label === '父级菜单')].isDisabled = !!this.editForm.menuCode
this.editFormData[this.editFormData.findIndex(item => item.name === 'isSpecial')].isDisabled = !!this.editForm.menuCode
this.editFormData[this.editFormData.findIndex(item => item.name === 'ownedCusgroupValue')].isDisabled = !!this.editForm.menuCode && !(this.editForm.ownedCusgroupType !== 3)
// this.editFormData[this.editFormData.findIndex(item => item.name === 'ownedCusgroupValue')].isDisabled = !!this.editForm.menuCode && !(this.editForm.ownedCusgroupType !== 3)
if (!this.editForm.menuCode) {
this.editFormData[this.editFormData.findIndex(item => item.name === 'ownedCusgroupValue')].isHide = true
this.editFormData[this.editFormData.findIndex(item => item.name === 'ownedMerchant')].isHide = true
}
},
handleAdd(isEdit = false) {
this.editVisible = !this.editVisible
this.editFormData[this.editFormData.findIndex(item => item.name === 'ownedCusgroupType')].isDisabled = this.editForm.menuCode
this.editDisable()
!isEdit && this.isMenuSpecial(false)
this.$refs.editFormRef.$refs[this.editChildRef] && (this.$refs.editFormRef.$refs[this.editChildRef].clearValidate())
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!