|
@@ -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 :disabled="!row.operation" @click="handleTableDel(row)">删除</el-button>
|
|
|
|
|
|
+ <el-button type="danger" size="small" plain :disabled="!row.operation || row.status !== 0" @click="handleTableDel(row)">删除</el-button>
|
|
</HcTooltip>
|
|
</HcTooltip>
|
|
</template>
|
|
</template>
|
|
</HcTable>
|
|
</HcTable>
|
|
@@ -303,8 +303,9 @@ const batchAbolishSave = async (ids) => {
|
|
//批量删除
|
|
//批量删除
|
|
const batchDeleteClick = () => {
|
|
const batchDeleteClick = () => {
|
|
const rows = tableCheckedKeys.value;
|
|
const rows = tableCheckedKeys.value;
|
|
- const result = rows.every(({operation})=> {
|
|
|
|
- return operation
|
|
|
|
|
|
+ //判断是否满足条件
|
|
|
|
+ const result = rows.every(({status, operation})=> {
|
|
|
|
+ return status === 0 && operation
|
|
})
|
|
})
|
|
//判断状态
|
|
//判断状态
|
|
if (result) {
|
|
if (result) {
|
|
@@ -320,7 +321,7 @@ const batchDeleteClick = () => {
|
|
}
|
|
}
|
|
})
|
|
})
|
|
} else {
|
|
} else {
|
|
- window.$message?.warning('只能删除自己上报的日志文件')
|
|
|
|
|
|
+ window.$message?.warning('只能删除自己的未上报日志文件')
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -354,17 +355,22 @@ const handleTableQuery = ({evisaPdfUrl, pdfUrl}) => {
|
|
}
|
|
}
|
|
|
|
|
|
//删除
|
|
//删除
|
|
-const handleTableDel = (row) => {
|
|
|
|
- window?.$messageBox?.alert('是否删除勾选的日志文件?', '删除文件', {
|
|
|
|
- showCancelButton: true,
|
|
|
|
- confirmButtonText: '确定删除',
|
|
|
|
- cancelButtonText: '取消',
|
|
|
|
- callback: (action) => {
|
|
|
|
- if (action === 'confirm') {
|
|
|
|
- theLogRemoveByIds([row.id])
|
|
|
|
|
|
+const handleTableDel = ({id, status, operation}) => {
|
|
|
|
+ //判断是否满足条件
|
|
|
|
+ if (status === 0 && operation) {
|
|
|
|
+ window?.$messageBox?.alert('是否删除勾选的日志文件?', '删除文件', {
|
|
|
|
+ showCancelButton: true,
|
|
|
|
+ confirmButtonText: '确定删除',
|
|
|
|
+ cancelButtonText: '取消',
|
|
|
|
+ callback: (action) => {
|
|
|
|
+ if (action === 'confirm') {
|
|
|
|
+ theLogRemoveByIds([id])
|
|
|
|
+ }
|
|
}
|
|
}
|
|
- }
|
|
|
|
- })
|
|
|
|
|
|
+ })
|
|
|
|
+ } else {
|
|
|
|
+ window.$message?.warning('只能删除自己的未上报日志文件')
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
//删除
|
|
//删除
|