feat(project-demand): 实现主子项目名称模糊查询功能

- 在项目需求汇总、成本明细、支出明细和共享明细页面添加主子项目名称模糊查询功能
- 新增相关 API 接口和方法以支持模糊查询
- 优化 fvSelect 组件以适配远程搜索功能
This commit is contained in:
dj
2025-08-03 18:55:53 +08:00
parent 1ad6e021a1
commit 19c566cd0d
5 changed files with 246 additions and 26 deletions

View File

@@ -221,7 +221,7 @@
:style="{marginLeft:!formData.isSpecialFund?route.query.id?'-10px':'-10px':route.query.id?'0':'-40px'}">
<el-form-item label="主项目" prop="masterProjectId">
<el-select v-model="formData.masterProjectId" clearable placeholder="请选择主项目"
@change="changeCollectData">
@change="changeCollectData" remote filterable :remote-method="filterMasterProject">
<el-option
v-for="item in masterProjectList"
:key="item.value"
@@ -567,6 +567,13 @@ const changeCollectData = () => {
localStorage.setItem('collectData', JSON.stringify(params))
}
}
const filterMasterProject= (val)=>{
if(val){
getProjectList(val)
}
}
const handleShowOptionalChargeLeadershipPicker = () => {
optionalChargeLeadershipPickerRef.value.showUserPicker()
}
@@ -584,8 +591,8 @@ const disabledDate = (time) => {
return time.getTime() < new Date(formData.value.startTime).getTime();
}
const getProjectList = () => {
getProjectOption().then(res => {
const getProjectList = (val) => {
getProjectOption(val).then(res => {
if (res.code === 1000) {
if(name.value === 'Summary/edit'){
masterProjectList.value = res.data.filter(item => item.value!=route.query.projectId)