|
@@ -25,13 +25,13 @@
|
|
</el-button>
|
|
</el-button>
|
|
</HcTooltip>
|
|
</HcTooltip>
|
|
<HcTooltip keys="ledger_query_abolish">
|
|
<HcTooltip keys="ledger_query_abolish">
|
|
- <el-button hc-btn :disabled="tableCheckedKeys.length <= 0" @click="batchAbolishClick">
|
|
|
|
|
|
+ <el-button hc-btn :disabled="tableCheckedKeys.length <= 0" :loading="abolishLoading" @click="batchAbolishClick">
|
|
<HcIcon name="delete-bin-3"/>
|
|
<HcIcon name="delete-bin-3"/>
|
|
<span>批量废除</span>
|
|
<span>批量废除</span>
|
|
</el-button>
|
|
</el-button>
|
|
</HcTooltip>
|
|
</HcTooltip>
|
|
<HcTooltip keys="ledger_query_delete">
|
|
<HcTooltip keys="ledger_query_delete">
|
|
- <el-button hc-btn :disabled="tableCheckedKeys.length <= 0" @click="batchDeleteClick">
|
|
|
|
|
|
+ <el-button hc-btn :disabled="tableCheckedKeys.length <= 0" :loading="deleteLoading" @click="batchDeleteClick">
|
|
<HcIcon name="delete-bin"/>
|
|
<HcIcon name="delete-bin"/>
|
|
<span>批量删除</span>
|
|
<span>批量删除</span>
|
|
</el-button>
|
|
</el-button>
|
|
@@ -49,7 +49,7 @@
|
|
<el-button type="primary" size="small" plain @click="handleTableQuery(row)">查询</el-button>
|
|
<el-button type="primary" size="small" plain @click="handleTableQuery(row)">查询</el-button>
|
|
</HcTooltip>
|
|
</HcTooltip>
|
|
<HcTooltip keys="ledger_query_table_del">
|
|
<HcTooltip keys="ledger_query_table_del">
|
|
- <el-button type="danger" size="small" plain @click="handleTableDel(row)">删除</el-button>
|
|
|
|
|
|
+ <el-button type="danger" size="small" plain :disabled="!row.operation" @click="handleTableDel(row)">删除</el-button>
|
|
</HcTooltip>
|
|
</HcTooltip>
|
|
</template>
|
|
</template>
|
|
</HcTable>
|
|
</HcTable>
|
|
@@ -217,11 +217,12 @@ const showReportFinish = () => {
|
|
}
|
|
}
|
|
|
|
|
|
//批量废除
|
|
//批量废除
|
|
|
|
+const abolishLoading = ref(false)
|
|
const batchAbolishClick = () => {
|
|
const batchAbolishClick = () => {
|
|
const rows = tableCheckedKeys.value;
|
|
const rows = tableCheckedKeys.value;
|
|
//判断是否满足条件
|
|
//判断是否满足条件
|
|
- const result = rows.every(({status})=> {
|
|
|
|
- return status !== 0 && status !== 3
|
|
|
|
|
|
+ const result = rows.every(({status, operation})=> {
|
|
|
|
+ return status !== 0 && status !== 3 && operation
|
|
})
|
|
})
|
|
//判断状态
|
|
//判断状态
|
|
if (result) {
|
|
if (result) {
|
|
@@ -238,14 +239,16 @@ const batchAbolishClick = () => {
|
|
}
|
|
}
|
|
})
|
|
})
|
|
} else {
|
|
} else {
|
|
- window.$message?.warning('未上报的文件不能废除')
|
|
|
|
|
|
+ window.$message?.warning('未上报的文件,和不是自己的文件,不能废除')
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
//废除勾选的已上报文件
|
|
//废除勾选的已上报文件
|
|
const batchAbolishSave = async (ids) => {
|
|
const batchAbolishSave = async (ids) => {
|
|
|
|
+ abolishLoading.value = true
|
|
const { error, code } = await queryApi.batchAbolish({ids: ids})
|
|
const { error, code } = await queryApi.batchAbolish({ids: ids})
|
|
//处理数据
|
|
//处理数据
|
|
|
|
+ abolishLoading.value = false
|
|
if (!error && code === 200) {
|
|
if (!error && code === 200) {
|
|
window.$message?.success('批量废除成功')
|
|
window.$message?.success('批量废除成功')
|
|
tableCheckedKeys.value = []
|
|
tableCheckedKeys.value = []
|
|
@@ -255,7 +258,26 @@ const batchAbolishSave = async (ids) => {
|
|
|
|
|
|
//批量删除
|
|
//批量删除
|
|
const batchDeleteClick = () => {
|
|
const batchDeleteClick = () => {
|
|
- window.$message?.warning('暂无接口')
|
|
|
|
|
|
+ const rows = tableCheckedKeys.value;
|
|
|
|
+ const result = rows.every(({operation})=> {
|
|
|
|
+ return operation
|
|
|
|
+ })
|
|
|
|
+ //判断状态
|
|
|
|
+ if (result) {
|
|
|
|
+ const ids = rowsToId(rows)
|
|
|
|
+ window?.$messageBox?.alert('是否删除勾选的日志文件?', '删除文件', {
|
|
|
|
+ showCancelButton: true,
|
|
|
|
+ confirmButtonText: '确定删除',
|
|
|
|
+ cancelButtonText: '取消',
|
|
|
|
+ callback: (action) => {
|
|
|
|
+ if (action === 'confirm') {
|
|
|
|
+ theLogRemoveByIds(ids)
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ } else {
|
|
|
|
+ window.$message?.warning('只能删除自己上报的日志文件')
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
//预览、打印
|
|
//预览、打印
|
|
@@ -277,13 +299,43 @@ const previewAndPrintClick = async () => {
|
|
}
|
|
}
|
|
|
|
|
|
//查询
|
|
//查询
|
|
-const handleTableQuery = (row) => {
|
|
|
|
- window.$message?.warning('暂无接口')
|
|
|
|
|
|
+const handleTableQuery = ({evisaPdfUrl, pdfUrl}) => {
|
|
|
|
+ if (evisaPdfUrl) {
|
|
|
|
+ window.open(evisaPdfUrl,'_blank')
|
|
|
|
+ } else if (pdfUrl) {
|
|
|
|
+ window.open(pdfUrl,'_blank')
|
|
|
|
+ } else {
|
|
|
|
+ window.$message?.warning('该数据暂无PDF')
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
//删除
|
|
//删除
|
|
const handleTableDel = (row) => {
|
|
const handleTableDel = (row) => {
|
|
- window.$message?.warning('暂无接口')
|
|
|
|
|
|
+ window?.$messageBox?.alert('是否删除勾选的日志文件?', '删除文件', {
|
|
|
|
+ showCancelButton: true,
|
|
|
|
+ confirmButtonText: '确定删除',
|
|
|
|
+ cancelButtonText: '取消',
|
|
|
|
+ callback: (action) => {
|
|
|
|
+ if (action === 'confirm') {
|
|
|
|
+ theLogRemoveByIds([row.id])
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+//删除
|
|
|
|
+const deleteLoading = ref(false)
|
|
|
|
+const theLogRemoveByIds = async (ids) => {
|
|
|
|
+ deleteLoading.value = true
|
|
|
|
+ const { error, code } = await queryApi.theLogRemoveByIds({
|
|
|
|
+ ids: ids
|
|
|
|
+ })
|
|
|
|
+ deleteLoading.value = false
|
|
|
|
+ if (!error && code === 200) {
|
|
|
|
+ window.$message?.success('删除成功')
|
|
|
|
+ tableCheckedKeys.value = []
|
|
|
|
+ getTableData()
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|