Commit 032e5d73 authored by ztf's avatar ztf

项目要素-经费页面

parent 713a05ad
<!--
* @Author: zhangtianfeng 3232807530@qq.com
* @Date: 2024-09-03 16:02:46
* @LastEditors: zhangtianfeng 3232807530@qq.com
* @LastEditTime: 2024-09-09 14:05:46
-->
<template>
<el-tabs type="card">
<el-tab-pane label="收入合同">
<el-tab-pane v-if="$route.query.type==='项目'" label="收入合同">
<div class="content">
<dee-as-page
:key="incomeContractPageKey"
......@@ -39,8 +33,8 @@ export default {
data() {
return {
spendingContractPageKey: '87b4f333-5f0e-4055-b215-f66b5d45f919',
incomeContractPageKey: '80bff7f2-0038-4ca6-9544-1496ce0b6459'
spendingContractPageKey: '94c7a401-56da-4fee-ba2c-dfef91045393',
incomeContractPageKey: '725ad38d-c85a-44a8-ae71-50cc257fe15a'
}
},
watch: {
......
<template>
<div class="projectContractList">
<dee-as-com
:lay-config="{
typeName: 'ExtInComeContract',
layKey: 'projectContractList'
}"
dis-business
:result-data="tableData"
@row-click="rowClickFunction"
/>
</div>
</template>
<script>
import { post } from '@/utils/http'
export default {
name: 'ProjectContractList',
componentName: '经费-收入合同列表',
props: {
basicData: {
type: Object,
default: () => {}
}
},
data() {
return {
// emitMethods: [
// {
// methods: 'getData',
// methodsName: '获取列表数据'
// }
// ],
evenList: [
{
even: 'row-click',
name: '行点击事件'
}
],
tableData: [],
type: null,
id: null
}
},
watch: {
// '$route.query.type': {
// immediate: true,
// deep: true,
// handler(val) {
// if (val) {
// console.log('val', val)
// if (val === '项目') {
// console.log('项目')
// this.id = this.$route.query.id
// } else {
// console.log('子项')
// this.getParentId()
// }
// this.getTableList()
// }
// }
// }
},
mounted() {
console.log('经费', this.basicData)
this.getTableList()
},
methods: {
getTableList() {
const params = {
'pageFrom': 1,
'pageSize': 9999,
'searchItems': {
'children': [],
'items': [
{
'fieldName': 'sourceId',
'operator': 'EQ',
'value': this.$route.query.id
}
],
'operator': 'AND'
},
'openProps': [
{
'name': 'target'
}
],
'sortItem': [
{
'fieldName': 'modifyTime',
'sortOrder': 'desc'
}
]
}
post('/ExtProjectContractLink/search', params).then(res => {
if (res.items.content) {
this.tableData = [res.items.content[0].target]
}
})
},
rowClickFunction(data) {
this.$emit('row-click', data.row)
}
// getParentId() {
// const params = {
// 'pageFrom': 1,
// 'pageSize': 9999,
// 'searchItems': {
// 'children': [],
// 'items': [
// {
// 'fieldName': 'id',
// 'operator': 'EQ',
// 'value': this.$route.query.id
// }
// ],
// 'operator': 'AND'
// },
// 'openProps': [
// {
// 'name': 'target'
// }
// ],
// 'sortItem': [
// {
// 'fieldName': 'modifyTime',
// 'sortOrder': 'desc'
// }
// ]
// }
// post('/DxContextProject/search', params).then(res => {
// if (res.items) {
// this.id = res.items.content[0].parentId
// }
// })
// }
}
}
</script>
<style lang="scss" scoped>
</style>
<template>
<div class="projectFundsExpenditureContractList">
<dee-as-com
:lay-config="{
typeName: 'ExtExpenditureContract',
layKey: 'projectFunds-expenditureContractList'
}"
dis-business
:result-data="tableData"
@row-click="rowClickFunction"
/>
</div>
</template>
<script>
import { post } from '@/utils/http'
export default {
name: 'ProjectFundsExpenditureContractList',
componentName: '经费-支出合同列表',
props: {
basicData: {
type: Object,
default: () => {}
}
},
data() {
return {
evenList: [
{
even: 'row-click',
name: '行点击事件'
}
],
tableData: [],
itemNumber: null
}
},
watch: {
},
async mounted() {
console.log('经费', this.basicData)
await this.getProjectNumber()
this.getTableList()
},
methods: {
async getProjectNumber() {
const params = {
'pageFrom': 1,
'pageSize': 9999,
'searchItems': {
'children': [],
'items': [
{
'fieldName': 'id',
'operator': 'EQ',
'value': this.$route.query.id
}
],
'operator': 'AND'
},
'openProps': [
{
'name': 'target'
}
],
'sortItem': [
{
'fieldName': 'modifyTime',
'sortOrder': 'desc'
}
]
}
await post('/DxContextProject/search', params).then(res => {
if (res.items.content) {
console.log('获取项目编号')
this.itemNumber = res.items.content[0].number
}
})
},
async getTableList() {
const params = {
'pageFrom': 1,
'pageSize': 9999,
'searchItems': {
'children': [],
'items': [
{
'fieldName': 'itemNumber',
'operator': 'EQ',
'value': this.itemNumber
}
],
'operator': 'AND'
},
'openProps': [
{
'name': 'target'
}
],
'sortItem': [
{
'fieldName': 'modifyTime',
'sortOrder': 'desc'
}
]
}
await post('/ExtExpenditureContract/search', params).then(res => {
if (res.items.content) {
this.tableData = res.items.content
}
})
},
rowClickFunction(data) {
this.$emit('row-click', data.row)
}
}
}
</script>
<style lang="scss" scoped>
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment