|
@@ -1,5 +1,5 @@
|
|
|
<template>
|
|
<template>
|
|
|
- <hc-drawer v-model="isShow" to-id="add-card-target" is-close>
|
|
|
|
|
|
|
+ <hc-drawer v-model="isShow" to-id="add-card-target" is-close @close="dialogClose">
|
|
|
<div class="relative h-95% overflow-y-auto bg-#F2F3F5 p-2">
|
|
<div class="relative h-95% overflow-y-auto bg-#F2F3F5 p-2">
|
|
|
<div>
|
|
<div>
|
|
|
<hc-icon class="text-18px text-black font-600" name="add-box" />
|
|
<hc-icon class="text-18px text-black font-600" name="add-box" />
|
|
@@ -69,7 +69,8 @@
|
|
|
</template>
|
|
</template>
|
|
|
<div class="flex p-1 text-sm font-bold">
|
|
<div class="flex p-1 text-sm font-bold">
|
|
|
<hc-icon name="arrow-down" class="mr-1 text-lightBlue" /><div>现金流入 </div>
|
|
<hc-icon name="arrow-down" class="mr-1 text-lightBlue" /><div>现金流入 </div>
|
|
|
- <span class="ml-2 text-blue">共计:xxxx元</span>
|
|
|
|
|
|
|
+
|
|
|
|
|
+ <span class="ml-2 mr-1 text-blue">共计:{{ yearFuns[selectIndex].inflowTotal }}</span><span class="ml-1 text-blue">万元</span>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="cash-in-list mt-2 flex justify-between">
|
|
<div class="cash-in-list mt-2 flex justify-between">
|
|
|
<div class="cash-in-list-item text-sm">
|
|
<div class="cash-in-list-item text-sm">
|
|
@@ -100,7 +101,7 @@
|
|
|
</div>
|
|
</div>
|
|
|
<div class="mt-2 flex p-1 text-sm font-bold">
|
|
<div class="mt-2 flex p-1 text-sm font-bold">
|
|
|
<hc-icon name="arrow-up" class="mr-1 text-orange" /><div>现金流出</div>
|
|
<hc-icon name="arrow-up" class="mr-1 text-orange" /><div>现金流出</div>
|
|
|
- <span class="ml-2 text-blue">共计:xxxx元</span>
|
|
|
|
|
|
|
+ <span class="ml-2 mr-1 text-blue">共计:{{ yearFuns[selectIndex].outflowTotal }}</span><span class="ml-1 text-blue">万元</span>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="cash-in-list1 mt-2 flex justify-between">
|
|
<div class="cash-in-list1 mt-2 flex justify-between">
|
|
|
<div class="cash-in-list-item text-sm">
|
|
<div class="cash-in-list-item text-sm">
|
|
@@ -158,7 +159,9 @@
|
|
|
<div class="flex items-center font-bold">
|
|
<div class="flex items-center font-bold">
|
|
|
<img :src="chengbenPng" class="icon-avatar mr-1">
|
|
<img :src="chengbenPng" class="icon-avatar mr-1">
|
|
|
<div>经营成本</div>
|
|
<div>经营成本</div>
|
|
|
- <span class="ml-2 text-blue">共计:xxxx元</span>
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ <span class="ml-2 mr-1 text-blue">共计:{{ yearFuns[selectIndex].costTotal }}</span><span class="ml-1 text-blue">万元</span>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="mt-1 w-full flex items-center justify-between">
|
|
<div class="mt-1 w-full flex items-center justify-between">
|
|
|
<span class="text-gray">养护、小修费</span>
|
|
<span class="text-gray">养护、小修费</span>
|
|
@@ -263,13 +266,13 @@
|
|
|
</div>
|
|
</div>
|
|
|
<div class="mt-4 text-center">
|
|
<div class="mt-4 text-center">
|
|
|
<el-button type="info" style="background-color: white; color: black; border-color: white" @click="dialogClose">退出</el-button>
|
|
<el-button type="info" style="background-color: white; color: black; border-color: white" @click="dialogClose">退出</el-button>
|
|
|
- <el-button type="primary" style="background-color: #2550A2; color: white; border-color: #2550A2" :loading="submitLoading" @click="dialogSubmit">保存</el-button>
|
|
|
|
|
|
|
+ <el-button type="primary" style="background-color: #2550A2; color: white; border-color: #2550A2" :loading="submitLoading" :disabled="data?.isView" @click="dialogSubmit">保存</el-button>
|
|
|
</div>
|
|
</div>
|
|
|
</hc-drawer>
|
|
</hc-drawer>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script setup>
|
|
<script setup>
|
|
|
-import { nextTick, ref, watch } from 'vue'
|
|
|
|
|
|
|
+import { computed, nextTick, ref, watch } from 'vue'
|
|
|
import jianshePng from '~src/assets/view/jianshe.png'
|
|
import jianshePng from '~src/assets/view/jianshe.png'
|
|
|
import sizePng from '~src/assets/view/size.png'
|
|
import sizePng from '~src/assets/view/size.png'
|
|
|
import jiechangPng from '~src/assets/view/jiechang.png'
|
|
import jiechangPng from '~src/assets/view/jiechang.png'
|
|
@@ -333,6 +336,9 @@ const yearFuns = ref([
|
|
|
operateOtherOutflow: '',
|
|
operateOtherOutflow: '',
|
|
|
operationTaxesOutflow: '',
|
|
operationTaxesOutflow: '',
|
|
|
otherOutflow: '',
|
|
otherOutflow: '',
|
|
|
|
|
+ inflowTotal:'',
|
|
|
|
|
+ outflowTotal:'',
|
|
|
|
|
+ costTotal:'',
|
|
|
},
|
|
},
|
|
|
])
|
|
])
|
|
|
const carList = ref([{
|
|
const carList = ref([{
|
|
@@ -373,6 +379,7 @@ watch(() => stageYearOptions1.value, (newOptions) => {
|
|
|
}, { immediate: true })
|
|
}, { immediate: true })
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+
|
|
|
const betweenTime = ref(null)
|
|
const betweenTime = ref(null)
|
|
|
const betweenTime1 = ref(null)
|
|
const betweenTime1 = ref(null)
|
|
|
//监听
|
|
//监听
|
|
@@ -393,6 +400,9 @@ watch(() => props.data, (data) => {
|
|
|
|
|
|
|
|
year: '',
|
|
year: '',
|
|
|
tollInflow: '',
|
|
tollInflow: '',
|
|
|
|
|
+ inflowTotal:'',
|
|
|
|
|
+ outflowTotal:'',
|
|
|
|
|
+ costTotal:'',
|
|
|
otherInflow: '',
|
|
otherInflow: '',
|
|
|
constructInvestOutflow: '',
|
|
constructInvestOutflow: '',
|
|
|
constructProportionOutflow: '',
|
|
constructProportionOutflow: '',
|
|
@@ -450,7 +460,6 @@ watch(isShow, (val) => {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
|
|
//日期时间被选择
|
|
//日期时间被选择
|
|
|
const betweenTimeUpdate = ({ arr, val, query }) => {
|
|
const betweenTimeUpdate = ({ arr, val, query }) => {
|
|
|
|
|
|
|
@@ -595,6 +604,44 @@ const getProOperationCompany = async () => {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
const selectIndex = ref(0)
|
|
const selectIndex = ref(0)
|
|
|
|
|
+watch(
|
|
|
|
|
+ () => [yearFuns.value[selectIndex.value].tollInflow, yearFuns.value[selectIndex.value].otherInflow],
|
|
|
|
|
+ ([tollInflow, otherInflow]) => {
|
|
|
|
|
+ yearFuns.value[selectIndex.value].inflowTotal = (tollInflow || 0) + (otherInflow || 0)
|
|
|
|
|
+ },
|
|
|
|
|
+ { immediate: true },
|
|
|
|
|
+)
|
|
|
|
|
+watch([
|
|
|
|
|
+ () => yearFuns.value[selectIndex.value].operateMaintainOutflow,
|
|
|
|
|
+ () => yearFuns.value[selectIndex.value].operateOverhaulOutflow,
|
|
|
|
|
+ () => yearFuns.value[selectIndex.value].operateCapitalOutflow,
|
|
|
|
|
+ () => yearFuns.value[selectIndex.value].operateOperationOutflow,
|
|
|
|
|
+ () => yearFuns.value[selectIndex.value].operateOtherOutflow,
|
|
|
|
|
+], () => {
|
|
|
|
|
+ yearFuns.value[selectIndex.value].costTotal
|
|
|
|
|
+ = Number(yearFuns.value[selectIndex.value].operateMaintainOutflow || 0)
|
|
|
|
|
+ + Number(yearFuns.value[selectIndex.value].operateOverhaulOutflow || 0)
|
|
|
|
|
+ + Number(yearFuns.value[selectIndex.value].operateCapitalOutflow || 0)
|
|
|
|
|
+ + Number(yearFuns.value[selectIndex.value].operateOperationOutflow || 0)
|
|
|
|
|
+ + Number(yearFuns.value[selectIndex.value].operateOtherOutflow || 0)
|
|
|
|
|
+}, { immediate: true })
|
|
|
|
|
+
|
|
|
|
|
+watch([
|
|
|
|
|
+ () => yearFuns.value[selectIndex.value].constructInvestOutflow,
|
|
|
|
|
+ () => yearFuns.value[selectIndex.value].borrowPrincipalOutflow,
|
|
|
|
|
+ () => yearFuns.value[selectIndex.value].borrowInterestOutflow,
|
|
|
|
|
+ () => yearFuns.value[selectIndex.value].costTotal,
|
|
|
|
|
+ () => yearFuns.value[selectIndex.value].operationTaxesOutflow,
|
|
|
|
|
+ () => yearFuns.value[selectIndex.value].otherOutflow,
|
|
|
|
|
+], () => {
|
|
|
|
|
+yearFuns.value[selectIndex.value].outflowTotal
|
|
|
|
|
+ = Number(yearFuns.value[selectIndex.value].constructInvestOutflow || 0)
|
|
|
|
|
+ + Number(yearFuns.value[selectIndex.value].borrowPrincipalOutflow || 0)
|
|
|
|
|
+ + Number(yearFuns.value[selectIndex.value].borrowInterestOutflow || 0)
|
|
|
|
|
+ + Number(yearFuns.value[selectIndex.value].costTotal || 0)
|
|
|
|
|
+ + Number(yearFuns.value[selectIndex.value].operationTaxesOutflow || 0)
|
|
|
|
|
+ + Number(yearFuns.value[selectIndex.value].otherOutflow || 0)
|
|
|
|
|
+}, { immediate: true })
|
|
|
const stageYearClick = async (val) => {
|
|
const stageYearClick = async (val) => {
|
|
|
if (yearFuns.value[selectIndex]) {
|
|
if (yearFuns.value[selectIndex]) {
|
|
|
yearFuns.value[selectIndex].year = val
|
|
yearFuns.value[selectIndex].year = val
|
|
@@ -610,7 +657,10 @@ const stageYearClick = async (val) => {
|
|
|
// 如果当前索引位置没有数据,初始化一个空对象
|
|
// 如果当前索引位置没有数据,初始化一个空对象
|
|
|
yearFuns.value[selectIndex.value] = {
|
|
yearFuns.value[selectIndex.value] = {
|
|
|
year: val,
|
|
year: val,
|
|
|
|
|
+ inflowTotal:'',
|
|
|
tollInflow: '',
|
|
tollInflow: '',
|
|
|
|
|
+ outflowTotal:'',
|
|
|
|
|
+ costTotal:'',
|
|
|
otherInflow: '',
|
|
otherInflow: '',
|
|
|
constructInvestOutflow: '',
|
|
constructInvestOutflow: '',
|
|
|
constructProportionOutflow: '',
|
|
constructProportionOutflow: '',
|
|
@@ -684,6 +734,9 @@ const dialogSubmit = async () => {
|
|
|
return {
|
|
return {
|
|
|
year: stageYearOptions.value[0].value,
|
|
year: stageYearOptions.value[0].value,
|
|
|
tollInflow: '',
|
|
tollInflow: '',
|
|
|
|
|
+ inflowTotal:'',
|
|
|
|
|
+ outflowTotal:'',
|
|
|
|
|
+ costTotal:'',
|
|
|
otherInflow: '',
|
|
otherInflow: '',
|
|
|
constructInvestOutflow: '',
|
|
constructInvestOutflow: '',
|
|
|
constructProportionOutflow: '',
|
|
constructProportionOutflow: '',
|
|
@@ -710,6 +763,9 @@ for (let i = 0; i < yearFuns.value.length; i++) {
|
|
|
yearFuns.value[i] = {
|
|
yearFuns.value[i] = {
|
|
|
year: stageYearOptions.value[i].value,
|
|
year: stageYearOptions.value[i].value,
|
|
|
tollInflow: '',
|
|
tollInflow: '',
|
|
|
|
|
+ inflowTotal:'',
|
|
|
|
|
+ outflowTotal:'',
|
|
|
|
|
+ costTotal:'',
|
|
|
otherInflow: '',
|
|
otherInflow: '',
|
|
|
constructInvestOutflow: '',
|
|
constructInvestOutflow: '',
|
|
|
constructProportionOutflow: '',
|
|
constructProportionOutflow: '',
|
|
@@ -759,16 +815,16 @@ if (!carList.value[i]) {
|
|
|
if (!error && code === 200) {
|
|
if (!error && code === 200) {
|
|
|
window?.$message?.success(msg)
|
|
window?.$message?.success(msg)
|
|
|
//刷新页面
|
|
//刷新页面
|
|
|
- setTimeout(()=>{
|
|
|
|
|
- window.location.reload()
|
|
|
|
|
- }, 1000)
|
|
|
|
|
|
|
+ // setTimeout(()=>{
|
|
|
|
|
+ // window.location.reload()
|
|
|
|
|
+ // }, 1000)
|
|
|
// baseForm.value = {}
|
|
// baseForm.value = {}
|
|
|
|
|
|
|
|
|
|
|
|
|
} else {
|
|
} else {
|
|
|
window.$message.error(msg ?? '操作失败')
|
|
window.$message.error(msg ?? '操作失败')
|
|
|
}
|
|
}
|
|
|
- dialogClose()
|
|
|
|
|
|
|
+ // dialogClose()
|
|
|
emit('finish')
|
|
emit('finish')
|
|
|
} else {
|
|
} else {
|
|
|
submitLoading.value = true
|
|
submitLoading.value = true
|
|
@@ -778,16 +834,16 @@ if (!carList.value[i]) {
|
|
|
submitLoading.value = false
|
|
submitLoading.value = false
|
|
|
if (!error && code === 200) {
|
|
if (!error && code === 200) {
|
|
|
window?.$message?.success(msg)
|
|
window?.$message?.success(msg)
|
|
|
- setTimeout(()=>{
|
|
|
|
|
- window.location.reload()
|
|
|
|
|
- }, 1000)
|
|
|
|
|
|
|
+ // setTimeout(()=>{
|
|
|
|
|
+ // window.location.reload()
|
|
|
|
|
+ // }, 1000)
|
|
|
// baseForm.value = {}
|
|
// baseForm.value = {}
|
|
|
|
|
|
|
|
|
|
|
|
|
} else {
|
|
} else {
|
|
|
window.$message.error(msg ?? '操作失败')
|
|
window.$message.error(msg ?? '操作失败')
|
|
|
}
|
|
}
|
|
|
- dialogClose()
|
|
|
|
|
|
|
+ // dialogClose()
|
|
|
emit('finish')
|
|
emit('finish')
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -797,6 +853,7 @@ const dialogClose = () => {
|
|
|
isShow.value = false
|
|
isShow.value = false
|
|
|
// baseForm.value = {}
|
|
// baseForm.value = {}
|
|
|
emit('close')
|
|
emit('close')
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|