Merge pull request 'fix : 修复费用分摊详情研究人员显示' (#304) from dj into master
Reviewed-on: http://git.feashow.cn/clay/mosr-web/pulls/304
This commit is contained in:
@@ -10,6 +10,8 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="jsx">
|
<script setup lang="jsx">
|
||||||
|
import {getResearchUser} from "@/api/expense-manage";
|
||||||
|
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
const searchConfig = reactive([
|
const searchConfig = reactive([
|
||||||
{
|
{
|
||||||
@@ -47,6 +49,13 @@ const searchConfig = reactive([
|
|||||||
])
|
])
|
||||||
const tableConfig = reactive({
|
const tableConfig = reactive({
|
||||||
columns: [
|
columns: [
|
||||||
|
{
|
||||||
|
prop: 'index',
|
||||||
|
type: 'index',
|
||||||
|
label: '序号',
|
||||||
|
align: 'center',
|
||||||
|
width: '80',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
prop: 'projectName',
|
prop: 'projectName',
|
||||||
label: '项目名称',
|
label: '项目名称',
|
||||||
@@ -55,7 +64,10 @@ const tableConfig = reactive({
|
|||||||
{
|
{
|
||||||
prop: 'researchPersonnel',
|
prop: 'researchPersonnel',
|
||||||
label: '研发人员',
|
label: '研发人员',
|
||||||
align: 'center'
|
align: 'center',
|
||||||
|
currentRender:({row})=>{
|
||||||
|
return <span>{getResearchName(row.researchPersonnel)}</span>
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'wagesPayable',
|
prop: 'wagesPayable',
|
||||||
@@ -99,6 +111,21 @@ const tableConfig = reactive({
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
const tableIns = ref()
|
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) => {
|
const search = (val) => {
|
||||||
tableConfig.params = {
|
tableConfig.params = {
|
||||||
allocationId:route.query.id,
|
allocationId:route.query.id,
|
||||||
@@ -106,6 +133,7 @@ const search = (val) => {
|
|||||||
}
|
}
|
||||||
tableIns.value.refresh()
|
tableIns.value.refresh()
|
||||||
}
|
}
|
||||||
|
getResearchOptions()
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|||||||
@@ -116,6 +116,7 @@ const tableConfig = reactive({
|
|||||||
allocationId:route.query.id
|
allocationId:route.query.id
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
const getDetail = async () => {
|
const getDetail = async () => {
|
||||||
const id = route.query.id
|
const id = route.query.id
|
||||||
shareProcessViewer.value = false
|
shareProcessViewer.value = false
|
||||||
|
|||||||
Reference in New Issue
Block a user