|
@@ -1,21 +1,19 @@
|
|
|
<template>
|
|
|
<div class="_ContractDetail_xmxx form-disabled-style">
|
|
|
<div class="header">
|
|
|
- <ul>
|
|
|
- <template v-if="(contractDetail?.['children']?.length ?? 0) !== 0">
|
|
|
- <li
|
|
|
- :class="{ active: contractInfoIndex === 0 }"
|
|
|
- @click="switchContractInfo(contractDetail, 0)"
|
|
|
- >主合同
|
|
|
- </li>
|
|
|
- <li
|
|
|
- v-for="(item, index) in contractDetail['children']"
|
|
|
- :class="{ active: contractInfoIndex === index + 1 }"
|
|
|
- :key="index"
|
|
|
- @click="switchContractInfo(item, index + 1)"
|
|
|
- >分包合同
|
|
|
- </li>
|
|
|
- </template>
|
|
|
+ <ul v-if="(contractDetail?.['children']?.length ?? 0) !== 0">
|
|
|
+ <li
|
|
|
+ :class="{ active: contractInfoIndex === 0 }"
|
|
|
+ @click="switchContractInfo(contractDetail, 0)"
|
|
|
+ >主合同
|
|
|
+ </li>
|
|
|
+ <li
|
|
|
+ v-for="(item, index) in contractDetail['children']"
|
|
|
+ :class="{ active: contractInfoIndex === index + 1 }"
|
|
|
+ :key="index"
|
|
|
+ @click="switchContractInfo(item, index + 1)"
|
|
|
+ >分包合同
|
|
|
+ </li>
|
|
|
</ul>
|
|
|
</div>
|
|
|
<div class="content">
|
|
@@ -218,9 +216,9 @@
|
|
|
</table>
|
|
|
</div>
|
|
|
<!-- 合同里程碑 -->
|
|
|
- <ContractMilestone :contractId="contractDetail?.['id']" />
|
|
|
+ <ContractMilestone :contractId="contractDetail?.id" />
|
|
|
<!-- 回款 -->
|
|
|
- <ContractReturnedMoney :contractId="contractDetail?.['id']" />
|
|
|
+ <ContractReturnedMoney :contractId="contractDetail?.id" />
|
|
|
</template>
|
|
|
<template v-else>
|
|
|
<div class="titleBox">
|
|
@@ -334,6 +332,7 @@ import ContractReturnedMoney from '@/views/OaSystem/projectCenter/projectDetail/
|
|
|
import ContractSharing from '@/views/OaSystem/projectCenter/projectDetail/components/xmht/ContractSharing.vue'
|
|
|
import { getContractsByProject, putContract } from '@/service/contract'
|
|
|
import { useQuery, useMutation } from '@tanstack/vue-query'
|
|
|
+import { Contract } from '@/interface/contract'
|
|
|
import { ref } from 'vue'
|
|
|
|
|
|
defineOptions({ name: 'XmhtComp' })
|
|
@@ -391,8 +390,8 @@ const secondTypeList = shallowReactive<TypeSelectInterface[]>([
|
|
|
}
|
|
|
])
|
|
|
const editor = ref<Boolean>(false)
|
|
|
-const contractDetail = ref({
|
|
|
- contractNumber: ''
|
|
|
+const contractDetail = ref<Contract>({
|
|
|
+ id: ''
|
|
|
})
|
|
|
|
|
|
const handleEdit = () => {
|
|
@@ -416,7 +415,6 @@ const { refetch } = useQuery(
|
|
|
async () => await getContractsByProject(unref(_mainProjectId)),
|
|
|
{
|
|
|
onSuccess: (tData) => {
|
|
|
- console.log('tData: ', tData)
|
|
|
contractDetail.value = tData
|
|
|
}
|
|
|
}
|