fix : 修复费用分摊详情研究人员显示
This commit is contained in:
@@ -10,6 +10,8 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import {getResearchUser} from "@/api/expense-manage";
|
||||
|
||||
const route = useRoute()
|
||||
const searchConfig = reactive([
|
||||
{
|
||||
@@ -47,6 +49,13 @@ const searchConfig = reactive([
|
||||
])
|
||||
const tableConfig = reactive({
|
||||
columns: [
|
||||
{
|
||||
prop: 'index',
|
||||
type: 'index',
|
||||
label: '序号',
|
||||
align: 'center',
|
||||
width: '80',
|
||||
},
|
||||
{
|
||||
prop: 'projectName',
|
||||
label: '项目名称',
|
||||
@@ -55,7 +64,10 @@ const tableConfig = reactive({
|
||||
{
|
||||
prop: 'researchPersonnel',
|
||||
label: '研发人员',
|
||||
align: 'center'
|
||||
align: 'center',
|
||||
currentRender:({row})=>{
|
||||
return <span>{getResearchName(row.researchPersonnel)}</span>
|
||||
}
|
||||
},
|
||||
{
|
||||
prop: 'wagesPayable',
|
||||
@@ -99,6 +111,21 @@ const tableConfig = reactive({
|
||||
}
|
||||
})
|
||||
const tableIns = ref()
|
||||
const researchOptions = ref([])
|
||||
const getResearchOptions = async () => {
|
||||
const res = await getResearchUser()
|
||||
researchOptions.value = res.data
|
||||
}
|
||||
const getResearchName=(id)=>{
|
||||
if(!id)return;
|
||||
let label=''
|
||||
researchOptions.value.forEach(item=>{
|
||||
if(item.value==id){
|
||||
label=item.label
|
||||
}
|
||||
})
|
||||
return label
|
||||
}
|
||||
const search = (val) => {
|
||||
tableConfig.params = {
|
||||
allocationId:route.query.id,
|
||||
@@ -106,6 +133,7 @@ const search = (val) => {
|
||||
}
|
||||
tableIns.value.refresh()
|
||||
}
|
||||
getResearchOptions()
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
@@ -116,6 +116,7 @@ const tableConfig = reactive({
|
||||
allocationId:route.query.id
|
||||
}
|
||||
})
|
||||
|
||||
const getDetail = async () => {
|
||||
const id = route.query.id
|
||||
shareProcessViewer.value = false
|
||||
|
||||
Reference in New Issue
Block a user