feat(organization): 全站所属组织搜索统一为树形下拉并修复项目部门宽度
- 新增复用 mixin organization-search.js,封装树形组织搜索功能,自动识别不同架构 - 替换合同管理、运输能力(司机/车辆/船舶)、费用模块的所属组织搜索使用树形下拉组件 - 将自定义搜索表单中所属组织 input 替换为 el-tree-select,支持树节点选中并写回名称 - 防止不同页面间组织数据相互覆盖,mixin 内部树数据命名为 organizationTreeOptions - 修复项目补录页面业务部门错用全宽样式,恢复半宽显示,调整注释避免误读 - 各相关页面组件中引入并使用 mixin,调用接口加载组织树数据,保障搜索功能一致性
This commit is contained in:
@@ -10,7 +10,19 @@
|
||||
<el-input v-model="query.projectName" clearable placeholder="请输入" />
|
||||
</el-form-item>
|
||||
<el-form-item label="所属组织">
|
||||
<el-input v-model="query.deptName" clearable placeholder="请输入" />
|
||||
<el-tree-select
|
||||
:model-value="query.deptName"
|
||||
:data="organizationTreeOptions"
|
||||
node-key="id"
|
||||
check-strictly
|
||||
filterable
|
||||
clearable
|
||||
render-after-expand
|
||||
style="width: 100%"
|
||||
placeholder="请选择 所属组织"
|
||||
:props="{ label: 'label', value: 'id', children: 'children' }"
|
||||
@update:model-value="val => { query.deptName = findOrgById(val)?.rawLabel || val }"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item class="invoice-kingdee-item" label="金蝶单据状态">
|
||||
<el-select v-model="query.kingdeeStatus" clearable placeholder="请选择">
|
||||
@@ -234,6 +246,7 @@ import * as XLSX from 'xlsx';
|
||||
import * as api from '@/api/payment/invoiceApplication';
|
||||
import * as formalSettlementApi from '@/api/settlement/formalSettlement';
|
||||
import { invoiceApplicationTableColumns } from '@/option/payment/invoiceApplication';
|
||||
import organizationSearch from '@/mixins/organization-search';
|
||||
|
||||
const emptyQuery = () => ({
|
||||
applicationNo: '',
|
||||
@@ -245,6 +258,7 @@ const emptyQuery = () => ({
|
||||
|
||||
export default {
|
||||
name: 'InvoiceApplication',
|
||||
mixins: [organizationSearch],
|
||||
data() {
|
||||
return {
|
||||
ArrowDown,
|
||||
@@ -266,6 +280,7 @@ export default {
|
||||
...mapGetters(['permission']),
|
||||
},
|
||||
mounted() {
|
||||
this.loadOrganizationOptions();
|
||||
this.loadTable();
|
||||
},
|
||||
methods: {
|
||||
|
||||
Reference in New Issue
Block a user