|
|
@ -2,7 +2,7 @@ |
|
|
<div class="mod-config"> |
|
|
<div class="mod-config"> |
|
|
<el-form :inline="true" :model="searchData" label-position="top" class="search-form"> |
|
|
<el-form :inline="true" :model="searchData" label-position="top" class="search-form"> |
|
|
<el-form-item label="BU"> |
|
|
<el-form-item label="BU"> |
|
|
<el-select v-model="searchData.buNo" clearable filterable placeholder="全部" style="width: 130px" @change="handleSearchBuChange"> |
|
|
|
|
|
|
|
|
<el-select v-model="searchData.buNo" filterable placeholder="请选择" style="width: 130px" @change="handleSearchBuChange"> |
|
|
<el-option |
|
|
<el-option |
|
|
v-for="item in userBuList" |
|
|
v-for="item in userBuList" |
|
|
:key="`searchBu_${item.buNo}`" |
|
|
:key="`searchBu_${item.buNo}`" |
|
|
@ -1449,10 +1449,12 @@ export default { |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
activated () { |
|
|
activated () { |
|
|
Promise.all([this.loadUserBuList(), this.queryProcessColumns(), this.loadTrackingColumns()]).then(() => { |
|
|
|
|
|
|
|
|
this.loadUserBuList().then(() => { |
|
|
|
|
|
return Promise.all([this.queryProcessColumns(), this.loadTrackingColumns()]) |
|
|
|
|
|
}).then(() => { |
|
|
this.queryBuProcessConfig() |
|
|
this.queryBuProcessConfig() |
|
|
}) |
|
|
|
|
|
this.getDataList() |
|
|
this.getDataList() |
|
|
|
|
|
}) |
|
|
}, |
|
|
}, |
|
|
deactivated () { |
|
|
deactivated () { |
|
|
this.destroyDefaultProcessConfigSortable() |
|
|
this.destroyDefaultProcessConfigSortable() |
|
|
@ -1684,8 +1686,29 @@ export default { |
|
|
const displayName = this.getRoleDisplayName(roleValue) |
|
|
const displayName = this.getRoleDisplayName(roleValue) |
|
|
return this.isBlankValue(displayName) ? '-' : displayName |
|
|
return this.isBlankValue(displayName) ? '-' : displayName |
|
|
}, |
|
|
}, |
|
|
|
|
|
getSearchBuOptionList () { |
|
|
|
|
|
return this.userBuList |
|
|
|
|
|
.map(item => this.normalizeBuNo(item && item.buNo ? item.buNo : '', this.searchData.site)) |
|
|
|
|
|
.filter(item => !!item) |
|
|
|
|
|
}, |
|
|
|
|
|
ensureSearchBuNoSelected () { |
|
|
|
|
|
const buOptionList = this.getSearchBuOptionList() |
|
|
|
|
|
if (buOptionList.length === 0) { |
|
|
|
|
|
this.searchData.buNo = '' |
|
|
|
|
|
return '' |
|
|
|
|
|
} |
|
|
|
|
|
const currentBuNo = this.normalizeBuNo(this.searchData.buNo, this.searchData.site) |
|
|
|
|
|
if (currentBuNo && buOptionList.indexOf(currentBuNo) > -1) { |
|
|
|
|
|
this.searchData.buNo = currentBuNo |
|
|
|
|
|
return currentBuNo |
|
|
|
|
|
} |
|
|
|
|
|
// 需求要求查询BU必须有值:为空或无效时默认回退到首个可用BU。 |
|
|
|
|
|
this.searchData.buNo = buOptionList[0] |
|
|
|
|
|
return this.searchData.buNo |
|
|
|
|
|
}, |
|
|
loadUserBuList () { |
|
|
loadUserBuList () { |
|
|
if (this.userBuList.length > 0) { |
|
|
if (this.userBuList.length > 0) { |
|
|
|
|
|
this.ensureSearchBuNoSelected() |
|
|
this.ensureBuProcessConfigRows() |
|
|
this.ensureBuProcessConfigRows() |
|
|
return Promise.resolve(this.userBuList) |
|
|
return Promise.resolve(this.userBuList) |
|
|
} |
|
|
} |
|
|
@ -1697,11 +1720,13 @@ export default { |
|
|
const buNo = item && item.buNo ? String(item.buNo).trim() : '' |
|
|
const buNo = item && item.buNo ? String(item.buNo).trim() : '' |
|
|
return excludedBuNoList.indexOf(buNo) === -1 |
|
|
return excludedBuNoList.indexOf(buNo) === -1 |
|
|
}) |
|
|
}) |
|
|
|
|
|
this.ensureSearchBuNoSelected() |
|
|
this.ensureBuProcessConfigRows() |
|
|
this.ensureBuProcessConfigRows() |
|
|
} |
|
|
} |
|
|
return this.userBuList |
|
|
return this.userBuList |
|
|
}).catch(() => { |
|
|
}).catch(() => { |
|
|
this.userBuList = [] |
|
|
this.userBuList = [] |
|
|
|
|
|
this.ensureSearchBuNoSelected() |
|
|
this.ensureBuProcessConfigRows() |
|
|
this.ensureBuProcessConfigRows() |
|
|
return [] |
|
|
return [] |
|
|
}) |
|
|
}) |
|
|
@ -1916,7 +1941,8 @@ export default { |
|
|
return this.normalizeBuNo(this.searchData.buNo, this.searchData.site) |
|
|
return this.normalizeBuNo(this.searchData.buNo, this.searchData.site) |
|
|
}, |
|
|
}, |
|
|
handleSearchBuChange () { |
|
|
handleSearchBuChange () { |
|
|
// BU筛选变化(含清空)后立即重新查询,并回到第一页。 |
|
|
|
|
|
|
|
|
this.ensureSearchBuNoSelected() |
|
|
|
|
|
// BU筛选变化后立即重新查询,并回到第一页。 |
|
|
this.queryProcessColumns().then(() => { |
|
|
this.queryProcessColumns().then(() => { |
|
|
this.getDataList('Y') |
|
|
this.getDataList('Y') |
|
|
}) |
|
|
}) |
|
|
@ -2976,7 +3002,6 @@ export default { |
|
|
resetSearch () { |
|
|
resetSearch () { |
|
|
this.searchData.projectNo = '' |
|
|
this.searchData.projectNo = '' |
|
|
this.searchData.projectDesc = '' |
|
|
this.searchData.projectDesc = '' |
|
|
this.searchData.buNo = '' |
|
|
|
|
|
this.searchData.testPartNo = '' |
|
|
this.searchData.testPartNo = '' |
|
|
this.searchData.partDesc = '' |
|
|
this.searchData.partDesc = '' |
|
|
this.searchData.dryWetType = '' |
|
|
this.searchData.dryWetType = '' |
|
|
@ -2985,6 +3010,7 @@ export default { |
|
|
this.searchData.projectPartSyncFlag = '' |
|
|
this.searchData.projectPartSyncFlag = '' |
|
|
this.searchData.proofSyncFlag = '' |
|
|
this.searchData.proofSyncFlag = '' |
|
|
this.searchData.proofingStatus = '' |
|
|
this.searchData.proofingStatus = '' |
|
|
|
|
|
this.ensureSearchBuNoSelected() |
|
|
this.queryProcessColumns().then(() => { |
|
|
this.queryProcessColumns().then(() => { |
|
|
this.getDataList('Y') |
|
|
this.getDataList('Y') |
|
|
}) |
|
|
}) |
|
|
|