|
@@ -8,10 +8,10 @@
|
|
</template>
|
|
</template>
|
|
<hc-table :column="tableColumn" :datas="tableData" :loading="tableLoading" is-new :index-style="{ width: 60 }">
|
|
<hc-table :column="tableColumn" :datas="tableData" :loading="tableLoading" is-new :index-style="{ width: 60 }">
|
|
<template #action="{ row }">
|
|
<template #action="{ row }">
|
|
- <el-link type="primary">查看报表</el-link>
|
|
|
|
|
|
+ <el-link type="primary" @click="viewPdf(row)">查看报表</el-link>
|
|
<el-link type="success" @click="editRow(row)">修改</el-link>
|
|
<el-link type="success" @click="editRow(row)">修改</el-link>
|
|
<el-link type="danger" @click="delCilck(row)">删除</el-link>
|
|
<el-link type="danger" @click="delCilck(row)">删除</el-link>
|
|
- <el-link>重新计算</el-link>
|
|
|
|
|
|
+ <el-link v-loading="recalculateLoading" @click="recalculate(row)">重新计算</el-link>
|
|
</template>
|
|
</template>
|
|
</hc-table>
|
|
</hc-table>
|
|
<template #action>
|
|
<template #action>
|
|
@@ -55,6 +55,7 @@ const useAppState = useAppStore()
|
|
const contractId = ref(useAppState.getContractId)
|
|
const contractId = ref(useAppState.getContractId)
|
|
const projectId = ref(useAppState.getProjectId)
|
|
const projectId = ref(useAppState.getProjectId)
|
|
import { delMessageV2 } from '~com/message/index.js'
|
|
import { delMessageV2 } from '~com/message/index.js'
|
|
|
|
+import { toPdfPage } from '~uti/btn-auth'
|
|
defineOptions({
|
|
defineOptions({
|
|
name: 'DebitPayMaterialBook',
|
|
name: 'DebitPayMaterialBook',
|
|
})
|
|
})
|
|
@@ -154,6 +155,10 @@ const addModalClick = () => {
|
|
editType.value = 'add'
|
|
editType.value = 'add'
|
|
modalTitle.value = '开工预付款报表新增'
|
|
modalTitle.value = '开工预付款报表新增'
|
|
}
|
|
}
|
|
|
|
+//查看报表
|
|
|
|
+const viewPdf = (row)=>{
|
|
|
|
+ toPdfPage(row.rawUrl)
|
|
|
|
+}
|
|
const editRow = (row)=>{
|
|
const editRow = (row)=>{
|
|
formModalShow.value = true
|
|
formModalShow.value = true
|
|
console.log(row, 'row')
|
|
console.log(row, 'row')
|
|
@@ -173,6 +178,22 @@ const delCilck = (row)=>{
|
|
}
|
|
}
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+//重新计算
|
|
|
|
+const recalculateLoading = ref(false)
|
|
|
|
+const recalculate = async (row)=>{
|
|
|
|
+ recalculateLoading.value = true
|
|
|
|
+ const { error, code, msg } = await bookApi.meterPdfInfo({
|
|
|
|
+ FormDataId:row.meterPeriodId,
|
|
|
|
+ ContractId:contractId.value,
|
|
|
|
+ type:2,
|
|
|
|
+ })
|
|
|
|
+ recalculateLoading.value = false
|
|
|
|
+ if (!error && code === 200) {
|
|
|
|
+ window.$message.success('计算成功')
|
|
|
|
+ getTableData()
|
|
|
|
+ }
|
|
|
|
+}
|
|
const removeProPay = async (id) => {
|
|
const removeProPay = async (id) => {
|
|
const { error, code } = await bookApi.remove({
|
|
const { error, code } = await bookApi.remove({
|
|
ids: id,
|
|
ids: id,
|