|
@@ -1008,9 +1008,31 @@ const addingFormClick = () => {
|
|
}
|
|
}
|
|
//删除当前节点用表
|
|
//删除当前节点用表
|
|
const deltableexcel =async (row) => {
|
|
const deltableexcel =async (row) => {
|
|
|
|
+ console.log(row,'row');
|
|
if(row['ancestors'].length>0||row['nodeType'].length>0){
|
|
if(row['ancestors'].length>0||row['nodeType'].length>0){
|
|
window?.$message?.warning('该表不允许删除')
|
|
window?.$message?.warning('该表不允许删除')
|
|
- }else{
|
|
|
|
|
|
+ }else if(row['pdfUrl'].length>0){
|
|
|
|
+ window?.$messageBox?.alert('该表已填写数据'+',请谨慎考虑后,确认是否需要删除?', '删除', {
|
|
|
|
+ showCancelButton: true,
|
|
|
|
+ confirmButtonText: '确认删除',
|
|
|
|
+ cancelButtonText: '取消',
|
|
|
|
+ callback:async (action) => {
|
|
|
|
+ if (action === 'confirm') {
|
|
|
|
+ const {error, code,msg} = await divisionApi.removeWbsTreeContract({
|
|
|
|
+ id: row.pkeyId,
|
|
|
|
+ stats:1
|
|
|
|
+ })
|
|
|
|
+ if (!error && code === 200) {
|
|
|
|
+ window?.$message?.success('删除成功')
|
|
|
|
+ window?.location?.reload() //刷新页面
|
|
|
|
+ }else{
|
|
|
|
+ window?.$message?.warning(msg)
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ else{
|
|
const {error, code,msg} = await divisionApi.removeWbsTreeContract({id: row.pkeyId,stats:0})
|
|
const {error, code,msg} = await divisionApi.removeWbsTreeContract({id: row.pkeyId,stats:0})
|
|
if (!error && code === 200) {
|
|
if (!error && code === 200) {
|
|
window?.$message?.success('删除成功')
|
|
window?.$message?.success('删除成功')
|