|
@@ -138,6 +138,11 @@ const tempResValue = ref({})
|
|
|
/** 打开弹窗 */
|
|
/** 打开弹窗 */
|
|
|
const open = async (id) => {
|
|
const open = async (id) => {
|
|
|
dialogVisible.value = true
|
|
dialogVisible.value = true
|
|
|
|
|
+ unPayTotal.value = 0
|
|
|
|
|
+ total.value = 0
|
|
|
|
|
+ totalDecimal.value = 0
|
|
|
|
|
+ longTermAmount.value = 0
|
|
|
|
|
+ payTotal.value = 0
|
|
|
const res = await getExpenseOrderDetail(id)
|
|
const res = await getExpenseOrderDetail(id)
|
|
|
tempResValue.value = res
|
|
tempResValue.value = res
|
|
|
res.items = res.items.filter(
|
|
res.items = res.items.filter(
|
|
@@ -149,6 +154,7 @@ const open = async (id) => {
|
|
|
item.isShow == 1
|
|
item.isShow == 1
|
|
|
)
|
|
)
|
|
|
let flag = false
|
|
let flag = false
|
|
|
|
|
+ let hasPartialPay = false
|
|
|
dataForm.value = res
|
|
dataForm.value = res
|
|
|
res.items.map((item) => {
|
|
res.items.map((item) => {
|
|
|
if (item.expenseSource == 'long_term_care_insurance') {
|
|
if (item.expenseSource == 'long_term_care_insurance') {
|
|
@@ -167,6 +173,12 @@ const open = async (id) => {
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ if (hasPartialPay) {
|
|
|
|
|
+ total.value += item.roundAmount
|
|
|
|
|
+ totalDecimal.value += item.roundTwoDecimalAmount
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
if (item.payStatus == 0) {
|
|
if (item.payStatus == 0) {
|
|
|
// 入院账单且isMonthlyExpense=1且入院向上取整
|
|
// 入院账单且isMonthlyExpense=1且入院向上取整
|
|
|
if (dataForm.value.type == '1' && item.isMonthlyExpense == 1) {
|
|
if (dataForm.value.type == '1' && item.isMonthlyExpense == 1) {
|
|
@@ -219,10 +231,12 @@ const open = async (id) => {
|
|
|
payTotal.value += Number(formatNum(item.totalAmount))
|
|
payTotal.value += Number(formatNum(item.totalAmount))
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- }else if (item.payStatus == 2) {
|
|
|
|
|
|
|
+ } else if (item.payStatus == 2) {
|
|
|
|
|
+ hasPartialPay = true
|
|
|
try {
|
|
try {
|
|
|
|
|
+ payTotal.value = tempResValue.value.payableAmount || 0
|
|
|
unPayTotal.value = (tempResValue.value.actualAmount - tempResValue.value.payableAmount) || 0
|
|
unPayTotal.value = (tempResValue.value.actualAmount - tempResValue.value.payableAmount) || 0
|
|
|
- }catch (e) {}
|
|
|
|
|
|
|
+ } catch (e) {}
|
|
|
}
|
|
}
|
|
|
total.value += item.roundAmount
|
|
total.value += item.roundAmount
|
|
|
totalDecimal.value += item.roundTwoDecimalAmount
|
|
totalDecimal.value += item.roundTwoDecimalAmount
|
|
@@ -380,7 +394,7 @@ const billTotalPrice = computed(() => {
|
|
|
} else if (fixed2Num.value) {
|
|
} else if (fixed2Num.value) {
|
|
|
return formatNum(totalDecimal.value)
|
|
return formatNum(totalDecimal.value)
|
|
|
} else {
|
|
} else {
|
|
|
- return formatNum(unPayTotal.value)
|
|
|
|
|
|
|
+ return formatNum(totalDecimal.value)
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|