1、调整凭证
2、调整运单
This commit is contained in:
+11
-10
@@ -443,18 +443,22 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['userInfo', 'permission']),
|
||||
// 所属组织级联配置:checkStrictly 允许选中任意层级,不必选到末级
|
||||
// 所属组织级联配置:checkStrictly 为 false 时只能选择最后一级(叶子节点)
|
||||
deptCascaderProps() {
|
||||
return {
|
||||
label: 'title',
|
||||
value: 'id',
|
||||
children: 'children',
|
||||
emitPath: true,
|
||||
checkStrictly: true,
|
||||
emitPath: false,
|
||||
checkStrictly: false,
|
||||
expandTrigger: 'click',
|
||||
leaf: (data, node) => {
|
||||
// 判断是否为叶子节点:没有 children 或 children 为空数组
|
||||
return !data.children || data.children.length === 0;
|
||||
},
|
||||
};
|
||||
},
|
||||
// 所属组织为单选级联:form.deptId 仍为数组(提交时 join),此处与 id 路径双向转换
|
||||
// 所属组织为单选级联:form.deptId 为数组(提交时 join),级联返回单个 id 值
|
||||
deptCascaderValue: {
|
||||
get() {
|
||||
const ids = Array.isArray(this.form.deptId)
|
||||
@@ -463,13 +467,10 @@ export default {
|
||||
? [this.form.deptId]
|
||||
: [];
|
||||
const id = ids.find(item => item !== undefined && item !== null && item !== '');
|
||||
return id === undefined ? [] : this.findDeptPath(id) || [id];
|
||||
return id === undefined ? '' : id;
|
||||
},
|
||||
set(path) {
|
||||
const value = Array.isArray(path)
|
||||
? path.filter(item => item !== undefined && item !== null && item !== '')
|
||||
: [];
|
||||
this.form.deptId = value.length ? [value.at(-1)] : [];
|
||||
set(value) {
|
||||
this.form.deptId = value ? [value] : [];
|
||||
this.$refs.userFormRef?.validateField('deptId');
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user