|
@@ -363,13 +363,22 @@ const fillContractForm = (data: any) => {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
contractForm.monthlyExpenses = data.monthlyExpenses || []
|
|
contractForm.monthlyExpenses = data.monthlyExpenses || []
|
|
|
- contractForm.oneTimeExpenses = data.oneTimeExpenses || []
|
|
|
|
|
|
|
+ //contractForm.oneTimeExpenses = data.oneTimeExpenses || []
|
|
|
contractForm.stageExpenses = data.stageExpenses || []
|
|
contractForm.stageExpenses = data.stageExpenses || []
|
|
|
-
|
|
|
|
|
|
|
+ //天河颐养院需要过滤掉‘一次性设施费’
|
|
|
const oneTime = data.oneTimeExpenses || []
|
|
const oneTime = data.oneTimeExpenses || []
|
|
|
- const deposit = findItem(oneTime, '押金')
|
|
|
|
|
- if (deposit) {
|
|
|
|
|
- const depositAmt = Number(deposit.actualAmount || deposit.amount || 0)
|
|
|
|
|
|
|
+ const filteredOneTime = oneTime.filter((item: { itemName: string; itemCategoryName: string }) => {
|
|
|
|
|
+ const name = item.itemName || ''
|
|
|
|
|
+ const category = item.itemCategoryName || ''
|
|
|
|
|
+ return !name.includes('一次性设施费') && !category.includes('一次性设施费')
|
|
|
|
|
+ })
|
|
|
|
|
+ contractForm.oneTimeExpenses = filteredOneTime || []
|
|
|
|
|
+ //console.log('一次性:', contractForm.oneTimeExpenses)
|
|
|
|
|
+
|
|
|
|
|
+ //const deposit = findItem(oneTime, '押金')
|
|
|
|
|
+ const firstItem = filteredOneTime.length > 0 ? filteredOneTime[0] : undefined // 取出数组第一个元素(对象)
|
|
|
|
|
+ if (firstItem) {
|
|
|
|
|
+ const depositAmt = Number(firstItem.actualAmount || firstItem.amount || 0)
|
|
|
contractForm.depositFee = String(depositAmt)
|
|
contractForm.depositFee = String(depositAmt)
|
|
|
contractForm.depositAmt = String(depositAmt)
|
|
contractForm.depositAmt = String(depositAmt)
|
|
|
contractForm.depositAmtCn = numToChinese(depositAmt)
|
|
contractForm.depositAmtCn = numToChinese(depositAmt)
|
|
@@ -377,7 +386,7 @@ const fillContractForm = (data: any) => {
|
|
|
contractForm.depositAmtCn1 = numToChinese(depositAmt)
|
|
contractForm.depositAmtCn1 = numToChinese(depositAmt)
|
|
|
contractForm.depositAmt2 = String(depositAmt)
|
|
contractForm.depositAmt2 = String(depositAmt)
|
|
|
contractForm.depositAmtCn2 = numToChinese(depositAmt)
|
|
contractForm.depositAmtCn2 = numToChinese(depositAmt)
|
|
|
- contractForm.depositType = deposit.itemName || ''
|
|
|
|
|
|
|
+ contractForm.depositType = firstItem.itemName || ''
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
const relative = (data.relativesList && data.relativesList[0]) || {}
|
|
const relative = (data.relativesList && data.relativesList[0]) || {}
|
|
@@ -453,11 +462,23 @@ const fetchContractData = async (row: any) => {
|
|
|
//console.log('合同信息接口:', JSON.parse(res.contractInfo))
|
|
//console.log('合同信息接口:', JSON.parse(res.contractInfo))
|
|
|
if (res) {
|
|
if (res) {
|
|
|
contractFormUpdate.value = res
|
|
contractFormUpdate.value = res
|
|
|
- // console.log('接口获取合同信息:', contractFormUpdate.value.contractInfo)
|
|
|
|
|
|
|
+ // console.log('接口获取合同信息:', contractFormUpdate.value.contractInfo)
|
|
|
contractFormUpdate.value.id = props.recordRow.id
|
|
contractFormUpdate.value.id = props.recordRow.id
|
|
|
if (contractFormUpdate.value.contractInfo) {
|
|
if (contractFormUpdate.value.contractInfo) {
|
|
|
try {
|
|
try {
|
|
|
const parsedData = JSON.parse(contractFormUpdate.value.contractInfo)
|
|
const parsedData = JSON.parse(contractFormUpdate.value.contractInfo)
|
|
|
|
|
+ //天河颐养院需要过滤掉‘一次性设施费’
|
|
|
|
|
+ const oneTime = parsedData.oneTimeExpenses || []
|
|
|
|
|
+ const filteredOneTime = oneTime.filter(
|
|
|
|
|
+ (item: { itemName: string; itemCategoryName: string }) => {
|
|
|
|
|
+ const name = item.itemName || ''
|
|
|
|
|
+ const category = item.itemCategoryName || ''
|
|
|
|
|
+ return !name.includes('一次性设施费') && !category.includes('一次性设施费')
|
|
|
|
|
+ }
|
|
|
|
|
+ )
|
|
|
|
|
+ parsedData.oneTimeExpenses = filteredOneTime || []
|
|
|
|
|
+ // console.log('一次性的:', parsedData.oneTimeExpenses)
|
|
|
|
|
+
|
|
|
if (parsedData) {
|
|
if (parsedData) {
|
|
|
Object.assign(contractForm, parsedData)
|
|
Object.assign(contractForm, parsedData)
|
|
|
}
|
|
}
|
|
@@ -471,9 +492,8 @@ const fetchContractData = async (row: any) => {
|
|
|
//console.log('config', config, key)
|
|
//console.log('config', config, key)
|
|
|
let id = undefined
|
|
let id = undefined
|
|
|
try {
|
|
try {
|
|
|
- id = contractForm.attachments[key].id
|
|
|
|
|
- }catch (e) {
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ id = contractForm.attachments[key].id
|
|
|
|
|
+ } catch (e) {}
|
|
|
//console.log('id', id)
|
|
//console.log('id', id)
|
|
|
if (id) {
|
|
if (id) {
|
|
|
detailPromises.push(
|
|
detailPromises.push(
|
|
@@ -482,7 +502,6 @@ const fetchContractData = async (row: any) => {
|
|
|
.then((detail) => {
|
|
.then((detail) => {
|
|
|
//console.log('获取详情', detail)
|
|
//console.log('获取详情', detail)
|
|
|
attachmentsMap[key] = JSON.parse(detail.content)
|
|
attachmentsMap[key] = JSON.parse(detail.content)
|
|
|
-
|
|
|
|
|
})
|
|
})
|
|
|
.catch((err) => {
|
|
.catch((err) => {
|
|
|
console.error(`获取附件详情失败: ${key}`, err)
|
|
console.error(`获取附件详情失败: ${key}`, err)
|
|
@@ -504,6 +523,8 @@ const fetchContractData = async (row: any) => {
|
|
|
try {
|
|
try {
|
|
|
const checkInRes = await getCheckInDetailByContractId(row.id)
|
|
const checkInRes = await getCheckInDetailByContractId(row.id)
|
|
|
if (checkInRes) {
|
|
if (checkInRes) {
|
|
|
|
|
+ if (checkInRes) {
|
|
|
|
|
+ }
|
|
|
fillContractForm(checkInRes)
|
|
fillContractForm(checkInRes)
|
|
|
}
|
|
}
|
|
|
contractForm.roomNo = contractFormUpdate.value.bedName
|
|
contractForm.roomNo = contractFormUpdate.value.bedName
|
|
@@ -748,9 +769,7 @@ const selectedAttachmentItems = computed(() => {
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
const page24AttachmentItems = computed(() => selectedAttachmentItems.value.slice(0, 14))
|
|
const page24AttachmentItems = computed(() => selectedAttachmentItems.value.slice(0, 14))
|
|
|
-const page25AttachmentItems = computed(() =>
|
|
|
|
|
- selectedAttachmentItems.value.slice(14)
|
|
|
|
|
-)
|
|
|
|
|
|
|
+const page25AttachmentItems = computed(() => selectedAttachmentItems.value.slice(14))
|
|
|
|
|
|
|
|
const contractFormUpdate = ref({})
|
|
const contractFormUpdate = ref({})
|
|
|
|
|
|
|
@@ -767,12 +786,10 @@ const saveContract = async () => {
|
|
|
const data = JSON.parse(row)
|
|
const data = JSON.parse(row)
|
|
|
|
|
|
|
|
if (data.id) {
|
|
if (data.id) {
|
|
|
-
|
|
|
|
|
contractForm.attachments[key] = { id: data.id }
|
|
contractForm.attachments[key] = { id: data.id }
|
|
|
const config = attachmentConfig[key]
|
|
const config = attachmentConfig[key]
|
|
|
|
|
|
|
|
contractFormUpdate.value[config.idField] = data.id
|
|
contractFormUpdate.value[config.idField] = data.id
|
|
|
-
|
|
|
|
|
}
|
|
}
|
|
|
} catch (e) {
|
|
} catch (e) {
|
|
|
console.log(e)
|
|
console.log(e)
|
|
@@ -2194,16 +2211,25 @@ watch(
|
|
|
<template v-else>
|
|
<template v-else>
|
|
|
<p class="content-text">
|
|
<p class="content-text">
|
|
|
本合同在履行过程中发生争议,当事人尽量协商解决。协商不成的,当事人可以选择下列第
|
|
本合同在履行过程中发生争议,当事人尽量协商解决。协商不成的,当事人可以选择下列第
|
|
|
- <span style="display: inline-block; min-width: 30px; text-align: center; border-bottom: 1px solid #333">
|
|
|
|
|
|
|
+ <span
|
|
|
|
|
+ style="
|
|
|
|
|
+ display: inline-block;
|
|
|
|
|
+ min-width: 30px;
|
|
|
|
|
+ text-align: center;
|
|
|
|
|
+ border-bottom: 1px solid #333;
|
|
|
|
|
+ "
|
|
|
|
|
+ >
|
|
|
{{ contractForm.disputeMode || '2' }}
|
|
{{ contractForm.disputeMode || '2' }}
|
|
|
</span>
|
|
</span>
|
|
|
种方式解决:
|
|
种方式解决:
|
|
|
</p>
|
|
</p>
|
|
|
<p class="content-text">
|
|
<p class="content-text">
|
|
|
- {{ contractForm.disputeMode === '1' ? '☑' : '□' }} 1.向仲裁机构申请仲裁。
|
|
|
|
|
|
|
+ {{ contractForm.disputeMode === '1' ? '☑' : '□' }}
|
|
|
|
|
+ 1.向仲裁机构申请仲裁。
|
|
|
</p>
|
|
</p>
|
|
|
<p class="content-text">
|
|
<p class="content-text">
|
|
|
- {{ contractForm.disputeMode === '2' ? '☑' : '□' }} 2.向有管辖权的人民法院提起诉讼。
|
|
|
|
|
|
|
+ {{ contractForm.disputeMode === '2' ? '☑' : '□' }}
|
|
|
|
|
+ 2.向有管辖权的人民法院提起诉讼。
|
|
|
</p>
|
|
</p>
|
|
|
</template>
|
|
</template>
|
|
|
</div>
|
|
</div>
|
|
@@ -2259,11 +2285,7 @@ watch(
|
|
|
<p class="content-text" style="padding-left: 2em">
|
|
<p class="content-text" style="padding-left: 2em">
|
|
|
附件{{ toChineseNumber(index + 1) }}:{{ item.title }}
|
|
附件{{ toChineseNumber(index + 1) }}:{{ item.title }}
|
|
|
</p>
|
|
</p>
|
|
|
- <p
|
|
|
|
|
- v-if="item.subTitle"
|
|
|
|
|
- class="content-text"
|
|
|
|
|
- style="padding-left: 3em; font-size: 13px"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ <p v-if="item.subTitle" class="content-text" style="padding-left: 3em; font-size: 13px">
|
|
|
{{ item.subTitle }}
|
|
{{ item.subTitle }}
|
|
|
</p>
|
|
</p>
|
|
|
</template>
|
|
</template>
|
|
@@ -2284,11 +2306,7 @@ watch(
|
|
|
<p class="content-text" style="padding-left: 2em">
|
|
<p class="content-text" style="padding-left: 2em">
|
|
|
附件{{ toChineseNumber(page24AttachmentItems.length + index + 1) }}:{{ item.title }}
|
|
附件{{ toChineseNumber(page24AttachmentItems.length + index + 1) }}:{{ item.title }}
|
|
|
</p>
|
|
</p>
|
|
|
- <p
|
|
|
|
|
- v-if="item.subTitle"
|
|
|
|
|
- class="content-text"
|
|
|
|
|
- style="padding-left: 3em; font-size: 13px"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ <p v-if="item.subTitle" class="content-text" style="padding-left: 3em; font-size: 13px">
|
|
|
{{ item.subTitle }}
|
|
{{ item.subTitle }}
|
|
|
</p>
|
|
</p>
|
|
|
</template>
|
|
</template>
|