|
|
@ -43,7 +43,24 @@ |
|
|
<el-input v-model="searchData.customerNo" style="width: 120px" clearable></el-input> |
|
|
<el-input v-model="searchData.customerNo" style="width: 120px" clearable></el-input> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item :label="'客户名称'"> |
|
|
<el-form-item :label="'客户名称'"> |
|
|
<el-input v-model="searchData.customerDesc" style="width: 120px" clearable></el-input> |
|
|
|
|
|
|
|
|
<el-select |
|
|
|
|
|
v-model="searchData.customerDesc" |
|
|
|
|
|
filterable |
|
|
|
|
|
clearable |
|
|
|
|
|
remote |
|
|
|
|
|
reserve-keyword |
|
|
|
|
|
placeholder="请输入客户名称" |
|
|
|
|
|
style="width: 160px" |
|
|
|
|
|
:remote-method="handleSearchCustomerRemote" |
|
|
|
|
|
:loading="searchCustomerOptionLoading" |
|
|
|
|
|
@visible-change="handleSearchCustomerVisibleChange"> |
|
|
|
|
|
<el-option |
|
|
|
|
|
v-for="item in searchCustomerOptions" |
|
|
|
|
|
:key="item.customerNo + '_' + item.customerDesc" |
|
|
|
|
|
:label="item.customerDesc" |
|
|
|
|
|
:value="item.customerDesc"> |
|
|
|
|
|
</el-option> |
|
|
|
|
|
</el-select> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item :label="'项目分类'"> |
|
|
<el-form-item :label="'项目分类'"> |
|
|
<el-select v-model="searchData.projectCategory" placeholder="请选择" clearable style="width: 130px"> |
|
|
<el-select v-model="searchData.projectCategory" placeholder="请选择" clearable style="width: 130px"> |
|
|
@ -1782,6 +1799,7 @@ import { |
|
|
warnSendMailHandle, |
|
|
warnSendMailHandle, |
|
|
confirmatorSendMailHandle, |
|
|
confirmatorSendMailHandle, |
|
|
eamProjectPartSearch, |
|
|
eamProjectPartSearch, |
|
|
|
|
|
queryProjectPartCustomerOptions, |
|
|
eamProjectPartInfoEdit, |
|
|
eamProjectPartInfoEdit, |
|
|
eamProjectPartInfoCancelEdit, |
|
|
eamProjectPartInfoCancelEdit, |
|
|
getFinalPartDesc, |
|
|
getFinalPartDesc, |
|
|
@ -1872,6 +1890,10 @@ import {uploadFileList} from '@/api/base/baseFunction.js'; |
|
|
activeModalTab: 'proofRecord', |
|
|
activeModalTab: 'proofRecord', |
|
|
// 导出 end |
|
|
// 导出 end |
|
|
tagNo:'', |
|
|
tagNo:'', |
|
|
|
|
|
searchCustomerOptions: [], |
|
|
|
|
|
searchCustomerOptionLoading: false, |
|
|
|
|
|
searchCustomerQueryToken: 0, |
|
|
|
|
|
searchCustomerOptionInitialized: false, |
|
|
fileName:'', |
|
|
fileName:'', |
|
|
folder: '', |
|
|
folder: '', |
|
|
selectTypeFlag: [], |
|
|
selectTypeFlag: [], |
|
|
@ -4120,6 +4142,48 @@ import {uploadFileList} from '@/api/base/baseFunction.js'; |
|
|
this.projectCategoryList = [] |
|
|
this.projectCategoryList = [] |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
handleSearchCustomerVisibleChange (visible) { |
|
|
|
|
|
if (!visible || this.searchCustomerOptionInitialized) { |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
this.querySearchCustomerOptions('') |
|
|
|
|
|
}, |
|
|
|
|
|
handleSearchCustomerRemote (keyword) { |
|
|
|
|
|
this.querySearchCustomerOptions(keyword) |
|
|
|
|
|
}, |
|
|
|
|
|
querySearchCustomerOptions (keyword) { |
|
|
|
|
|
const normalizedKeyword = keyword == null ? '' : String(keyword).trim() |
|
|
|
|
|
const queryToken = this.searchCustomerQueryToken + 1 |
|
|
|
|
|
this.searchCustomerQueryToken = queryToken |
|
|
|
|
|
this.searchCustomerOptionLoading = true |
|
|
|
|
|
queryProjectPartCustomerOptions({ |
|
|
|
|
|
userName: this.$store.state.user.name, |
|
|
|
|
|
customerDesc: normalizedKeyword |
|
|
|
|
|
}).then(({ data }) => { |
|
|
|
|
|
if (queryToken !== this.searchCustomerQueryToken) { |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
if (!(data && data.code === 0)) { |
|
|
|
|
|
this.searchCustomerOptions = [] |
|
|
|
|
|
this.$message.error((data && data.msg) || '查询客户下拉失败') |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
const rows = Array.isArray(data.rows) ? data.rows : [] |
|
|
|
|
|
this.searchCustomerOptions = rows.filter(item => item && item.customerDesc) |
|
|
|
|
|
if (!normalizedKeyword) { |
|
|
|
|
|
this.searchCustomerOptionInitialized = true |
|
|
|
|
|
} |
|
|
|
|
|
}).catch(() => { |
|
|
|
|
|
if (queryToken === this.searchCustomerQueryToken) { |
|
|
|
|
|
this.searchCustomerOptions = [] |
|
|
|
|
|
this.$message.error('查询客户下拉异常') |
|
|
|
|
|
} |
|
|
|
|
|
}).finally(() => { |
|
|
|
|
|
if (queryToken === this.searchCustomerQueryToken) { |
|
|
|
|
|
this.searchCustomerOptionLoading = false |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
// 查询区 BU 变化后刷新项目分类 |
|
|
// 查询区 BU 变化后刷新项目分类 |
|
|
searchBuChangeHandle (buDesc) { |
|
|
searchBuChangeHandle (buDesc) { |
|
|
this.searchData.projectCategory = '' |
|
|
this.searchData.projectCategory = '' |
|
|
|