|
@@ -16,8 +16,8 @@
|
|
|
<div class="text-orange font-400">收方总金额:{{ meterMoney }}元</div>
|
|
|
</template>
|
|
|
<template #extra>
|
|
|
- <el-button hc-btn type="primary" @click="addModalClick">新增</el-button>
|
|
|
- <el-button hc-btn type="warning" @click="reportClick">按期上报</el-button>
|
|
|
+ <el-button hc-btn type="primary" :disabled="approveStatus !== 0" @click="addModalClick">新增</el-button>
|
|
|
+ <el-button hc-btn type="warning" :disabled="approveStatus !== 0 || tableData.length <= 0" @click="reportClick">按期上报</el-button>
|
|
|
<el-button hc-btn type="success" @click="detailsModalClick">清单明细</el-button>
|
|
|
<el-button hc-btn type="success" @click="isReportDrawer = true">查看报表</el-button>
|
|
|
<el-button hc-btn color="#626aef" @click="sortClick(1)">按部位排序</el-button>
|
|
@@ -35,8 +35,8 @@
|
|
|
{{ getTableStatus(row) }}
|
|
|
</template>
|
|
|
<template #action="{ row }">
|
|
|
- <el-link type="success" @click="rowEditClick(row)">修改</el-link>
|
|
|
- <el-link type="danger" @click="rowDelClick(row)">删除</el-link>
|
|
|
+ <el-link type="success" :disabled="approveStatus !== 0" @click="rowEditClick(row)">修改</el-link>
|
|
|
+ <el-link type="danger" :disabled="approveStatus !== 0" @click="rowDelClick(row)">删除</el-link>
|
|
|
</template>
|
|
|
</hc-table>
|
|
|
<template #action>
|
|
@@ -84,8 +84,8 @@ const uuid = getRandom(4)
|
|
|
//渲染完成
|
|
|
onMounted(async () => {
|
|
|
setSplitRef()
|
|
|
- await getKey1Data()
|
|
|
- getCurrentMeterMoney()
|
|
|
+ await getKey1Data()
|
|
|
+ getCurrentMeterMoney().then()
|
|
|
})
|
|
|
|
|
|
//初始化设置拖动分割线
|
|
@@ -105,22 +105,27 @@ const searchForm = ref({
|
|
|
contractPeriodId: null, contractUnitId: null, contractId: contractId.value, type: 1,
|
|
|
current: 1, size: 10, total: 0,
|
|
|
})
|
|
|
+const approveStatus = ref(0)
|
|
|
|
|
|
//计量期
|
|
|
const key1Data = ref([])
|
|
|
const getKey1Data = async ()=>{
|
|
|
const { error, code, data } = await mainApi.getAllPeriod({
|
|
|
- contractId:contractId.value,
|
|
|
- type:1,
|
|
|
+ contractId: contractId.value,
|
|
|
+ type: 1,
|
|
|
})
|
|
|
if (!error && code === 200) {
|
|
|
- key1Data.value = getArrValue(data)
|
|
|
- searchForm.value.contractPeriodId = key1Data.value[ key1Data.value.length - 1].id
|
|
|
+ let newArr = getArrValue(data), info = getObjValue(newArr[newArr.length - 1])
|
|
|
+ searchForm.value.contractPeriodId = info.id
|
|
|
+ approveStatus.value = info.approveStatus
|
|
|
+ key1Data.value = newArr
|
|
|
} else {
|
|
|
key1Data.value = []
|
|
|
}
|
|
|
}
|
|
|
const searchKey1Click = () => {
|
|
|
+ let info = getObjValue(key1Data.value.find((item) => item.id === searchForm.value.contractPeriodId))
|
|
|
+ approveStatus.value = info.approveStatus
|
|
|
searchForm.value.current = 1
|
|
|
getTableData()
|
|
|
getCurrentMeterMoney()
|