|
|
@ -8,7 +8,7 @@ |
|
|
|
|
|
|
|
|
<el-form :inline="true" label-position="top" :model="searchData" @keyup.enter.native="getDataList()"> |
|
|
<el-form :inline="true" label-position="top" :model="searchData" @keyup.enter.native="getDataList()"> |
|
|
<el-form-item :label="'BU'"> |
|
|
<el-form-item :label="'BU'"> |
|
|
<el-select v-model="searchData.buDesc" placeholder="请选择" clearable style="width: 130px"> |
|
|
|
|
|
|
|
|
<el-select v-model="searchData.buDesc" placeholder="请选择" clearable style="width: 130px" @change="searchBuChangeHandle"> |
|
|
<el-option |
|
|
<el-option |
|
|
v-for = "i in userBuList" |
|
|
v-for = "i in userBuList" |
|
|
:key = "i.buNo" |
|
|
:key = "i.buNo" |
|
|
@ -32,7 +32,7 @@ |
|
|
<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"> |
|
|
<el-option |
|
|
<el-option |
|
|
v-for = "i in projectCategoryList" |
|
|
|
|
|
|
|
|
v-for = "i in searchProjectCategoryList" |
|
|
:key = "i.projectCategory" |
|
|
:key = "i.projectCategory" |
|
|
:label = "i.projectCategory" |
|
|
:label = "i.projectCategory" |
|
|
:value = "i.projectCategory"> |
|
|
:value = "i.projectCategory"> |
|
|
@ -182,7 +182,7 @@ |
|
|
<template #label> |
|
|
<template #label> |
|
|
<span class="big-label">BU</span> |
|
|
<span class="big-label">BU</span> |
|
|
</template> |
|
|
</template> |
|
|
<el-select v-model="modalData.bu" placeholder="请选择" :disabled="modalDisableFlag" style="width: 151px"> |
|
|
|
|
|
|
|
|
<el-select v-model="modalData.bu" placeholder="请选择" :disabled="modalDisableFlag" style="width: 151px" @change="modalBuChangeHandle"> |
|
|
<el-option |
|
|
<el-option |
|
|
v-for = "i in userBuList" |
|
|
v-for = "i in userBuList" |
|
|
:key = "i.buNo" |
|
|
:key = "i.buNo" |
|
|
@ -1005,7 +1005,7 @@ |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
<script> |
|
|
<script> |
|
|
import {getSiteAndBuByUserName} from "@/api/eam/eam.js" |
|
|
|
|
|
|
|
|
import {getProjectCategoryByBu, getSiteAndBuByUserName} from "@/api/eam/eam.js" |
|
|
import { |
|
|
import { |
|
|
searchBusinessInfo, |
|
|
searchBusinessInfo, |
|
|
searchBusinessInfo1, |
|
|
searchBusinessInfo1, |
|
|
@ -2683,17 +2683,8 @@ import {updateColumnSize} from "../../../api/table"; |
|
|
} |
|
|
} |
|
|
], |
|
|
], |
|
|
}, |
|
|
}, |
|
|
projectCategoryList: [ |
|
|
|
|
|
{ |
|
|
|
|
|
projectCategory: 'Low Risk', |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
projectCategory: 'High Risk', |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
projectCategory: 'Sustaining', |
|
|
|
|
|
} |
|
|
|
|
|
], |
|
|
|
|
|
|
|
|
searchProjectCategoryList: [], |
|
|
|
|
|
projectCategoryList: [], |
|
|
cProjectRegionList: [ |
|
|
cProjectRegionList: [ |
|
|
{ |
|
|
{ |
|
|
cProjectRegion: 'Global', |
|
|
cProjectRegion: 'Global', |
|
|
@ -2799,9 +2790,88 @@ import {updateColumnSize} from "../../../api/table"; |
|
|
getSiteAndBuByUserName(tempData).then(({data}) => { |
|
|
getSiteAndBuByUserName(tempData).then(({data}) => { |
|
|
if (data.code === 0) { |
|
|
if (data.code === 0) { |
|
|
this.userBuList = data.rows |
|
|
this.userBuList = data.rows |
|
|
|
|
|
const defaultBuNo = this.userBuList.length > 0 ? this.getBuNoByJoinedValue(this.userBuList[0].buNo) : '' |
|
|
|
|
|
this.loadSearchProjectCategory('') |
|
|
|
|
|
this.loadModalProjectCategory(defaultBuNo) |
|
|
|
|
|
} else { |
|
|
|
|
|
this.userBuList = [] |
|
|
|
|
|
this.searchProjectCategoryList = [] |
|
|
|
|
|
this.projectCategoryList = [] |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
// 从 site_bu 中截取 bu_no |
|
|
|
|
|
getBuNoByJoinedValue (buValue) { |
|
|
|
|
|
if (!buValue) { |
|
|
|
|
|
return '' |
|
|
|
|
|
} |
|
|
|
|
|
let buParts = buValue.split('_') |
|
|
|
|
|
if (buParts.length >= 2) { |
|
|
|
|
|
return buParts[1] |
|
|
|
|
|
} |
|
|
|
|
|
return buValue |
|
|
|
|
|
}, |
|
|
|
|
|
// 根据 BU 描述获取 bu_no |
|
|
|
|
|
getBuNoByBuDesc (buDesc) { |
|
|
|
|
|
if (!buDesc) { |
|
|
|
|
|
return '' |
|
|
|
|
|
} |
|
|
|
|
|
let matchBu = this.userBuList.find(item => item.buDesc === buDesc) |
|
|
|
|
|
if (!matchBu) { |
|
|
|
|
|
return '' |
|
|
|
|
|
} |
|
|
|
|
|
return this.getBuNoByJoinedValue(matchBu.buNo) |
|
|
|
|
|
}, |
|
|
|
|
|
// 加载查询区项目分类 |
|
|
|
|
|
loadSearchProjectCategory (buNo) { |
|
|
|
|
|
let inData = { |
|
|
|
|
|
site: this.$store.state.user.site, |
|
|
|
|
|
buNo: buNo || '' |
|
|
|
|
|
} |
|
|
|
|
|
getProjectCategoryByBu(inData).then(({data}) => { |
|
|
|
|
|
if (data && data.code === 0) { |
|
|
|
|
|
this.searchProjectCategoryList = data.rows || [] |
|
|
|
|
|
} else { |
|
|
|
|
|
this.searchProjectCategoryList = [] |
|
|
|
|
|
} |
|
|
|
|
|
}).catch(() => { |
|
|
|
|
|
this.searchProjectCategoryList = [] |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
// 加载弹窗项目分类 |
|
|
|
|
|
loadModalProjectCategory (buNo, currentProjectCategory) { |
|
|
|
|
|
let inData = { |
|
|
|
|
|
site: this.$store.state.user.site, |
|
|
|
|
|
buNo: buNo || '' |
|
|
|
|
|
} |
|
|
|
|
|
getProjectCategoryByBu(inData).then(({data}) => { |
|
|
|
|
|
if (data && data.code === 0) { |
|
|
|
|
|
let categoryList = (data.rows || []).slice() |
|
|
|
|
|
if (currentProjectCategory && !categoryList.some(item => item.projectCategory === currentProjectCategory)) { |
|
|
|
|
|
categoryList.push({ |
|
|
|
|
|
projectCategory: currentProjectCategory |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
this.projectCategoryList = categoryList |
|
|
|
|
|
} else { |
|
|
|
|
|
this.projectCategoryList = [] |
|
|
|
|
|
} |
|
|
|
|
|
}).catch(() => { |
|
|
|
|
|
this.projectCategoryList = [] |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
// 查询区 BU 变化后刷新项目分类 |
|
|
|
|
|
searchBuChangeHandle (buDesc) { |
|
|
|
|
|
this.searchData.projectCategory = '' |
|
|
|
|
|
let buNo = this.getBuNoByBuDesc(buDesc) |
|
|
|
|
|
this.loadSearchProjectCategory(buNo) |
|
|
|
|
|
}, |
|
|
|
|
|
// 弹窗 BU 变化后刷新项目分类 |
|
|
|
|
|
modalBuChangeHandle (buValue) { |
|
|
|
|
|
this.modalData.projectCategory = '' |
|
|
|
|
|
let buNo = this.getBuNoByJoinedValue(buValue) |
|
|
|
|
|
this.loadModalProjectCategory(buNo) |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
// 获取基础数据列表S |
|
|
// 获取基础数据列表S |
|
|
getBaseList (val,type) { |
|
|
getBaseList (val,type) { |
|
|
@ -3398,6 +3468,8 @@ import {updateColumnSize} from "../../../api/table"; |
|
|
createBy: this.$store.state.user.name, |
|
|
createBy: this.$store.state.user.name, |
|
|
updateBy: this.$store.state.user.name, |
|
|
updateBy: this.$store.state.user.name, |
|
|
} |
|
|
} |
|
|
|
|
|
let defaultBuNo = this.getBuNoByJoinedValue(this.modalData.bu) |
|
|
|
|
|
this.loadModalProjectCategory(defaultBuNo) |
|
|
this.modalDisableFlag = false |
|
|
this.modalDisableFlag = false |
|
|
this.modalPartDisableFlag = false |
|
|
this.modalPartDisableFlag = false |
|
|
this.clearButtonFlag = false |
|
|
this.clearButtonFlag = false |
|
|
@ -3469,6 +3541,8 @@ import {updateColumnSize} from "../../../api/table"; |
|
|
if (row.cQualityEngineer7 != null && row.cQualityEngineer7 !== ''){ |
|
|
if (row.cQualityEngineer7 != null && row.cQualityEngineer7 !== ''){ |
|
|
this.modalData.cQualityEngineer7Name= row.cQualityEngineer7.split('-')[1] // 截取用户名 |
|
|
this.modalData.cQualityEngineer7Name= row.cQualityEngineer7.split('-')[1] // 截取用户名 |
|
|
} |
|
|
} |
|
|
|
|
|
let editBuNo = this.getBuNoByJoinedValue(this.modalData.bu) |
|
|
|
|
|
this.loadModalProjectCategory(editBuNo, this.modalData.projectCategory) |
|
|
this.modalDisableFlag = true |
|
|
this.modalDisableFlag = true |
|
|
this.modalPartDisableFlag = false |
|
|
this.modalPartDisableFlag = false |
|
|
this.clearButtonFlag = true |
|
|
this.clearButtonFlag = true |
|
|
|