✨ 完善配载确认、承运商组织过滤司机与地址展示
配载草稿确认生成正式单并优化详情/列表地址市区展示;运单调度等按承运商联系人所属组织筛选司机车辆;统一地图搜索结果与登录默认账号清理。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1132,17 +1132,18 @@
|
||||
<el-input v-model="row.email" maxlength="100" :disabled="readonly" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="所属部门" min-width="200">
|
||||
<el-table-column label="所属部门" min-width="220">
|
||||
<template #default="{ row }">
|
||||
<el-input
|
||||
v-if="!isInternalCustomer"
|
||||
:model-value="row.deptNames"
|
||||
disabled
|
||||
/>
|
||||
<el-select
|
||||
<el-cascader
|
||||
v-else
|
||||
v-model="row.deptIdList"
|
||||
multiple
|
||||
:options="deptTree"
|
||||
:props="invoiceDeptCascaderProps"
|
||||
collapse-tags
|
||||
collapse-tags-tooltip
|
||||
filterable
|
||||
@@ -1150,14 +1151,7 @@
|
||||
:disabled="readonly"
|
||||
placeholder="请选择所属部门"
|
||||
@change="() => handleInvoiceContactDeptChange(row)"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in invoiceDeptOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" min-width="160">
|
||||
@@ -2095,6 +2089,18 @@ export default {
|
||||
expandTrigger: 'click',
|
||||
};
|
||||
},
|
||||
// 发票联系信息所属部门:级联多选,可勾选任意层级
|
||||
invoiceDeptCascaderProps() {
|
||||
return {
|
||||
value: 'value',
|
||||
label: 'label',
|
||||
children: 'children',
|
||||
multiple: true,
|
||||
checkStrictly: true,
|
||||
emitPath: false,
|
||||
expandTrigger: 'click',
|
||||
};
|
||||
},
|
||||
// 所属组织级联值:archiveForm.deptId 只存选中的部门 ID(单选),
|
||||
// 级联控件需要根到选中节点的完整路径,两者在此做双向转换——
|
||||
// 部门树是异步加载的,依赖 deptTree 可保证树加载完成后回显自动刷新。
|
||||
@@ -2156,12 +2162,6 @@ export default {
|
||||
isInternalCustomer() {
|
||||
return this.archiveForm.customerKind === 'internal';
|
||||
},
|
||||
invoiceDeptOptions() {
|
||||
return this.flattenDept(this.deptTree).map(item => ({
|
||||
label: item.rawLabel,
|
||||
value: String(item.value),
|
||||
}));
|
||||
},
|
||||
isTemporaryToFormal() {
|
||||
return (
|
||||
Boolean(this.archiveForm.id) &&
|
||||
@@ -3432,7 +3432,17 @@ export default {
|
||||
this.invoiceForm.contacts.splice(index, 1);
|
||||
},
|
||||
handleInvoiceContactDeptChange(row) {
|
||||
const ids = Array.isArray(row.deptIdList) ? row.deptIdList.map(item => String(item)) : [];
|
||||
// emitPath=false 时,多选级联值为选中节点 id 数组
|
||||
const rawList = Array.isArray(row.deptIdList) ? row.deptIdList : [];
|
||||
const ids = rawList
|
||||
.map(item => {
|
||||
if (Array.isArray(item)) {
|
||||
return item.length ? String(item[item.length - 1]) : '';
|
||||
}
|
||||
return item !== undefined && item !== null && item !== '' ? String(item) : '';
|
||||
})
|
||||
.filter(Boolean);
|
||||
row.deptIdList = ids;
|
||||
row.deptIds = ids.join(',');
|
||||
row.deptNames = ids.map(id => this.findDeptLabel(id)).filter(Boolean).join('、');
|
||||
},
|
||||
@@ -5434,7 +5444,12 @@ export default {
|
||||
width: 100%;
|
||||
|
||||
:deep(.el-input),
|
||||
:deep(.el-select) {
|
||||
:deep(.el-select),
|
||||
:deep(.el-cascader) {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
:deep(.el-cascader .el-input) {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user