Commit 00ac3bb1 by zhangxw

财务/对账商品品类支持一级二级三级同时选择

1 parent 2f42269a
......@@ -2765,7 +2765,8 @@ export default {
}
::v-deep {
.el-select__tags {
.el-select__tags,
.el-cascader__tags {
white-space: nowrap;
overflow: hidden;
flex-wrap: nowrap;
......@@ -2775,10 +2776,19 @@ export default {
align-items: center;
}
}
.el-cascader__tags {
.el-tag span {
display: inline-block;
max-width: 240px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
}
.el-select__tags-text {
display: inline-block;
max-width: 260px;
max-width: 240px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
......
......@@ -61,13 +61,11 @@
]">
<el-cascader v-model="cascaderGoodsTypes"
placeholder="请选择品类"
style="width: 320px"
clearable
style="width: 370px"
collapse-tags
filterable
:options="computedGoodsTypeTreeList"
:props="cascaderProps"
:show-all-levels="false"
@change="onCascaderChange" />
</el-form-item>
<el-form-item v-show="classificationObj.categoryType == 2"
......@@ -307,18 +305,19 @@ export default {
}
});
// 1. 处理当前Tab已选路径(同一Tab内的禁用规则)
currentPaths.forEach((path) => {
if (!path || !path.length) {
return;
}
// 禁用该路径的所有祖先(从第0个到倒数第2个)
for (let i = 0; i < path.length - 1; i++) {
shouldDisableValues.add(path[i]);
}
// 禁用该路径的所有后代
this.collectAllDescendantsByPath(tree, path, shouldDisableValues);
});
// ⚠️ 同Tab内的禁用规则已注释:不再禁用祖先和后代节点,允许在同一Tab内自由选择
// // 1. 处理当前Tab已选路径(同一Tab内的禁用规则)
// currentPaths.forEach((path) => {
// if (!path || !path.length) {
// return;
// }
// // 禁用该路径的所有祖先(从第0个到倒数第2个)
// for (let i = 0; i < path.length - 1; i++) {
// shouldDisableValues.add(path[i]);
// }
// // 禁用该路径的所有后代
// this.collectAllDescendantsByPath(tree, path, shouldDisableValues);
// });
// 2. 处理其他Tab已选路径(跨Tab禁用规则)
// 规则:只禁用节点本身(防止重复),父级、子级、兄弟级都可以选
......
......@@ -65,13 +65,11 @@
])">
<el-cascader v-model="cascaderGoodsTypes"
placeholder="请选择品类"
style="width: 320px"
clearable
style="width: 370px"
collapse-tags
filterable
:options="computedGoodsTypeTreeList"
:props="cascaderProps"
:show-all-levels="false"
@change="onCascaderChange" />
</el-form-item>
<el-form-item v-show="classificationObj.categoryType == 2"
......@@ -81,7 +79,7 @@
v-el-select-loadmore="interestsLoadmore"
placeholder="请选择商品"
popper-class="class123"
style="width: 320px"
style="width: 370px"
value-key="merchantGoodsCode"
collapse-tags
filterable
......@@ -1214,18 +1212,19 @@ export default {
}
});
// 1. 处理当前Tab已选路径(同一Tab内的禁用规则)
currentPaths.forEach((path) => {
if (!path || !path.length) {
return;
}
// 禁用该路径的所有祖先(从第0个到倒数第2个)
for (let i = 0; i < path.length - 1; i++) {
shouldDisableValues.add(path[i]);
}
// 禁用该路径的所有后代
this.collectAllDescendantsByPath(tree, path, shouldDisableValues);
});
// ⚠️ 同Tab内的禁用规则已注释:不再禁用祖先和后代节点,允许在同一Tab内自由选择
// // 1. 处理当前Tab已选路径(同一Tab内的禁用规则)
// currentPaths.forEach((path) => {
// if (!path || !path.length) {
// return;
// }
// // 禁用该路径的所有祖先(从第0个到倒数第2个)
// for (let i = 0; i < path.length - 1; i++) {
// shouldDisableValues.add(path[i]);
// }
// // 禁用该路径的所有后代
// this.collectAllDescendantsByPath(tree, path, shouldDisableValues);
// });
// 2. 处理其他Tab已选路径(跨Tab禁用规则)
// 规则:只禁用节点本身(防止重复),父级、子级、兄弟级都可以选
......@@ -2928,7 +2927,8 @@ export default {
}
::v-deep {
.el-select__tags {
.el-select__tags,
.el-cascader__tags {
white-space: nowrap;
overflow: hidden;
flex-wrap: nowrap;
......@@ -2938,10 +2938,19 @@ export default {
align-items: center;
}
}
.el-cascader__tags {
.el-tag span {
display: inline-block;
max-width: 240px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
}
.el-select__tags-text {
display: inline-block;
max-width: 180px;
max-width: 240px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!